Skip to content
Snippets Groups Projects
Unverified Commit 1a564df5 authored by Eugen Rochko's avatar Eugen Rochko Committed by GitHub
Browse files

Do not encode HTML entities in initial Web Push payload body (#7592)

parent 4c9d5a50
No related branches found
No related tags found
No related merge requests found
......@@ -33,6 +33,7 @@ class Web::NotificationSerializer < ActiveModel::Serializer
end
def body
truncate(strip_tags(object.target_status&.spoiler_text&.presence || object.target_status&.text || object.from_account.note), length: 140)
str = truncate(strip_tags(object.target_status&.spoiler_text&.presence || object.target_status&.text || object.from_account.note), length: 140)
HTMLEntities.new.decode(str.to_str) # Do not encode entities, since this value will not be used in HTML
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment