Fix rendering of emoji in public pages

This commit is contained in:
Thibaut Girka 2019-06-18 19:54:36 +02:00 committed by ThibG
parent 48ec6abaca
commit 5ea45351a0

View File

@ -59,11 +59,10 @@ class Formatter
html = "RT @#{prepend_reblog} #{html}" if prepend_reblog html = "RT @#{prepend_reblog} #{html}" if prepend_reblog
html = format_markdown(html) if status.content_type == 'text/markdown' html = format_markdown(html) if status.content_type == 'text/markdown'
html = encode_and_link_urls(html, linkable_accounts, keep_html: %w(text/markdown text/html).include?(status.content_type)) html = encode_and_link_urls(html, linkable_accounts, keep_html: %w(text/markdown text/html).include?(status.content_type))
html = reformat(html) if %w(text/markdown text/html).include?(status.content_type)
html = encode_custom_emojis(html, status.emojis, options[:autoplay]) if options[:custom_emojify] html = encode_custom_emojis(html, status.emojis, options[:autoplay]) if options[:custom_emojify]
if %w(text/markdown text/html).include?(status.content_type) unless %w(text/markdown text/html).include?(status.content_type)
html = reformat(html)
else
html = simple_format(html, {}, sanitize: false) html = simple_format(html, {}, sanitize: false)
html = html.delete("\n") html = html.delete("\n")
end end