Browse Source

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

closed-social-glitch-2
Eugen Rochko 2 years ago
committed by GitHub
parent
commit
085f286750
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      app/lib/formatter.rb

+ 2
- 0
app/lib/formatter.rb 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

Loading…
Cancel
Save