From ba969db9c809990973f1f962ec338286a16d4636 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Thu, 3 Mar 2022 06:45:46 +0100 Subject: [PATCH] Fix returning empty `

` tag for blank account `note` in REST API (#17687) --- app/lib/formatter.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/lib/formatter.rb b/app/lib/formatter.rb index 6f02d669ac..b6a13163d5 100644 --- a/app/lib/formatter.rb +++ b/app/lib/formatter.rb @@ -57,6 +57,8 @@ class Formatter end def simplified_format(account, **options) + return '' if account.note.blank? + html = account.local? ? linkify(account.note) : reformat(account.note) html = encode_custom_emojis(html, account.emojis, options[:autoplay]) if options[:custom_emojify] html.html_safe # rubocop:disable Rails/OutputSafety