]> cat aescling's git repositories - mastodon.git/commitdiff
fix a regression introduced by e2491680e696d2c285a798ec4c66b26d2748df66 (#2966)
authorbeatrix <beatrix.bitrot@gmail.com>
Wed, 10 May 2017 18:32:59 +0000 (14:32 -0400)
committerEugen Rochko <eugen@zeonfederated.com>
Wed, 10 May 2017 18:32:59 +0000 (20:32 +0200)
that caused user pages to break when showing toots with CWs

app/lib/formatter.rb

index 7b5b8bab4576ac1b7813ad830b2fd9b1d7f5de69..5b008278c608bac042c42c578cedf7a1851839a4 100644 (file)
@@ -29,9 +29,10 @@ class Formatter
     return reformat(status.spoiler_text) unless status.local?
 
     html = status.spoiler_text
-    html = encode(html)
+    html = encode_and_link_urls(html)
+
+    html = simple_format(html, {}, sanitize: false)
     html = html.delete("\n")
-    html = link_hashtags(html)
 
     html.html_safe # rubocop:disable Rails/OutputSafety
   end