From d7520f81759e9db58a5b5ca61b9114e9ef44d92f Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Sun, 12 May 2019 21:33:37 +0200 Subject: Add support for HTML-formatted toots --- app/lib/formatter.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/lib') diff --git a/app/lib/formatter.rb b/app/lib/formatter.rb index fe5b5b7b7..eaece8797 100644 --- a/app/lib/formatter.rb +++ b/app/lib/formatter.rb @@ -37,9 +37,9 @@ class Formatter html = raw_content html = "RT @#{prepend_reblog} #{html}" if prepend_reblog html = format_markdown(html) if status.content_type == 'text/markdown' - html = encode_and_link_urls(html, linkable_accounts, keep_html: 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_custom_emojis(html, status.emojis, options[:autoplay]) if options[:custom_emojify] - html = simple_format(html, {}, sanitize: false) unless status.content_type == 'text/markdown' + html = simple_format(html, {}, sanitize: false) unless %w(text/markdown text/html).include?(status.content_type) html = html.delete("\n") html.html_safe # rubocop:disable Rails/OutputSafety -- cgit