From a64973aecff0595bd34a6e70393d471b8dbf1841 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Fri, 7 Feb 2020 15:24:22 +0100 Subject: Fix malformed HTML causing uncaught error (#13042) Fix OEmbed preview API leaking existence of private statuses (see #12930) --- app/lib/formatter.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/lib/formatter.rb') diff --git a/app/lib/formatter.rb b/app/lib/formatter.rb index 2c5674869..e6f5d7a63 100644 --- a/app/lib/formatter.rb +++ b/app/lib/formatter.rb @@ -46,6 +46,8 @@ class Formatter def reformat(html) sanitize(html, Sanitize::Config::MASTODON_STRICT) + rescue ArgumentError + '' end def plaintext(status) -- cgit