From 14a5d249ad2ad78f00699bbab9062b3ea88ec93c Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Fri, 7 Feb 2020 15:24:22 +0100 Subject: port tootsuite/#13042 to monsterfork: Fix malformed HTML causing uncaught error Fix OEmbed preview API leaking existence of private statuses (see #12930) --- app/lib/formatter.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'app/lib') diff --git a/app/lib/formatter.rb b/app/lib/formatter.rb index b81ef8668..77b3ac97e 100644 --- a/app/lib/formatter.rb +++ b/app/lib/formatter.rb @@ -248,6 +248,7 @@ class Formatter html.html_safe # rubocop:disable Rails/OutputSafety end +<<<<<<< HEAD def format_screenreader(html) html.gsub(/\ufdd3(.*)\ufdd4/m, '') end @@ -278,6 +279,8 @@ class Formatter html.gsub!("\r\n", "\n") html.gsub!("\n\r", "\n") html.gsub("\r", "\n") + rescue ArgumentError + '' end def plaintext(status) -- cgit