about summary refs log tree commit diff
path: root/app/serializers/web/notification_serializer.rb
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2018-05-23 19:19:28 +0200
committerGitHub <noreply@github.com>2018-05-23 19:19:28 +0200
commit88ec5193cb377500c4500d31d7ba9fa441f1f5ee (patch)
treed517f10fdeffb6adaf7e349ea78593c02534c84a /app/serializers/web/notification_serializer.rb
parent7719fe0df27a59cb7292989688efaa4efc6cbccc (diff)
parente0ef89c73f6b380a2841b9dcde07725d515340a4 (diff)
Merge pull request #510 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/serializers/web/notification_serializer.rb')
-rw-r--r--app/serializers/web/notification_serializer.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/serializers/web/notification_serializer.rb b/app/serializers/web/notification_serializer.rb
index f3c4ffc47..43ba4d92a 100644
--- a/app/serializers/web/notification_serializer.rb
+++ b/app/serializers/web/notification_serializer.rb
@@ -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