Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Commit

Permalink
Fix returning empty <p> tag for blank account note in REST API (m…
Browse files Browse the repository at this point in the history
  • Loading branch information
Gargron authored Mar 3, 2022
1 parent 54d4ece commit 085f286
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/lib/formatter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ def plaintext(status)
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
Expand Down

0 comments on commit 085f286

Please sign in to comment.