From 9c8e602163811fc9a21c5ae78d53d46d7dbc8db7 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sat, 23 Sep 2017 01:50:17 +0200 Subject: Fix custom emojis not detected when used in content warning (#5049) --- app/lib/formatter.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'app/lib') 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) -- cgit