Fix autoplay issue with spoiler tag (#8540)

Add tests to avoid similar issues in the future
This commit is contained in:
Renato "Lond" Cerqueira 2018-08-31 15:16:59 +02:00 committed by Eugen Rochko
parent 50d8cf8aed
commit fe56d26f7b
4 changed files with 26 additions and 3 deletions

View file

@ -61,7 +61,7 @@ class Formatter
Sanitize.fragment(html, config)
end
def format_spoiler(status)
def format_spoiler(status, **options)
html = encode(status.spoiler_text)
html = encode_custom_emojis(html, status.emojis, options[:autoplay])
html.html_safe # rubocop:disable Rails/OutputSafety