Fix returning empty <p> tag for blank account note in REST API (#17687)

This commit is contained in:
Eugen Rochko 2022-03-03 06:45:46 +01:00 committed by GitHub
parent 54d4ece743
commit 085f286750
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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