about summary refs log tree commit diff
path: root/app/lib
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-09-23 01:50:17 +0200
committerGitHub <noreply@github.com>2017-09-23 01:50:17 +0200
commit9c8e602163811fc9a21c5ae78d53d46d7dbc8db7 (patch)
tree2588674edc8940dae61cf94c7ff98ba10100fa80 /app/lib
parent846cd4e8381c891816cf814582304b534db4ee5f (diff)
Fix custom emojis not detected when used in content warning (#5049)
Diffstat (limited to 'app/lib')
-rw-r--r--app/lib/formatter.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/lib/formatter.rb b/app/lib/formatter.rb
index 8d69cb948..42cd72990 100644
--- a/app/lib/formatter.rb
+++ b/app/lib/formatter.rb
@@ -63,6 +63,12 @@ class Formatter
     Sanitize.fragment(html, config)
   end
 
+  def format_spoiler(status)
+    html = encode(status.spoiler_text)
+    html = encode_custom_emojis(html, status.emojis)
+    html.html_safe # rubocop:disable Rails/OutputSafety
+  end
+
   private
 
   def encode(html)