about summary refs log tree commit diff
path: root/app/lib/formatter.rb
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2020-02-09 12:15:55 +0100
committerThibaut Girka <thib@sitedethib.com>2020-02-09 12:15:55 +0100
commitdae5e446fe7294dba0e14311ef3da4dc8fff6a3a (patch)
tree33a76386b1e8bc9c968bfc49409f72000b7ec410 /app/lib/formatter.rb
parenta2cfe3daaadabfaad71969a44c460bd76b8405ff (diff)
parent57c42c20c01b46f0d7cad5a357d56190274a3fa1 (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Conflicts:
- `Gemfile`:
  We updated httplog in a separate commit.
  Took upstream's change which updated it further.
- `Gemfile.lock`:
  We updated httplog in a separate commit.
  Took upstream's change which updated it further.
- `app/lib/sanitize_config.rb`:
  Upstream added better unsupported link stripping,
  while we had different sanitizing configs.
  Took only upstream's link stripping code.
- `config/locales/simple_form.pl.yml`:
  Strings unused in glitch-soc had been removed from
  glitch-soc, reintroduced them even if they are not
  useful, to reduce the risk of later merge conflicts.
Diffstat (limited to 'app/lib/formatter.rb')
-rw-r--r--app/lib/formatter.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/lib/formatter.rb b/app/lib/formatter.rb
index f1a751f84..fcc99d009 100644
--- a/app/lib/formatter.rb
+++ b/app/lib/formatter.rb
@@ -77,6 +77,8 @@ class Formatter
 
   def reformat(html)
     sanitize(html, Sanitize::Config::MASTODON_STRICT)
+  rescue ArgumentError
+    ''
   end
 
   def plaintext(status)