diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2022-03-03 06:45:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-03 06:45:46 +0100 |
commit | 085f286750e50fe7dca4f005cefac48da0eda7cd (patch) | |
tree | 4f90cec0e89e9446ff0c3136139feef170e051bd | |
parent | 54d4ece7432a34a2ba24617851f04801e5a389d8 (diff) |
Fix returning empty `<p>` tag for blank account `note` in REST API (#17687)
-rw-r--r-- | app/lib/formatter.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/lib/formatter.rb b/app/lib/formatter.rb index 6f02d669a..b6a13163d 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 |