Skip to content
Snippets Groups Projects
Unverified Commit 8ffa96b0 authored by Claire's avatar Claire Committed by GitHub
Browse files

Fix web push notifications containing HTML entities (#18071)

parent ea383278
No related branches found
No related tags found
No related merge requests found
......@@ -34,6 +34,6 @@ class Web::NotificationSerializer < ActiveModel::Serializer
def body
str = strip_tags(object.target_status&.spoiler_text&.presence || object.target_status&.text || object.from_account.note)
truncate(HTMLEntities.new.decode(str.to_str), length: 140) # Do not encode entities, since this value will not be used in HTML
truncate(HTMLEntities.new.decode(str.to_str), length: 140, escape: false) # 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