diff --git a/app/assets/javascripts/app/controllers/widget/online_notification.coffee b/app/assets/javascripts/app/controllers/widget/online_notification.coffee index d3cbd8b90..0aead3db0 100644 --- a/app/assets/javascripts/app/controllers/widget/online_notification.coffee +++ b/app/assets/javascripts/app/controllers/widget/online_notification.coffee @@ -154,7 +154,7 @@ class App.OnlineNotificationWidget extends App.Controller title = item.objectNative.activityMessage(item) else title = "Need objectNative in item #{item.object}.find(#{item.o_id})" - title = title.replace(/<.+?>/g, '"') + title = App.Utils.html2text(title.replace(/<.+?>/g, '"')) @notifyDesktop( url: item.link title: title diff --git a/public/assets/tests/html_utils.js b/public/assets/tests/html_utils.js index 7aef1d5fb..85f3afb7e 100644 --- a/public/assets/tests/html_utils.js +++ b/public/assets/tests/html_utils.js @@ -84,6 +84,11 @@ test("html2text", function() { result = App.Utils.html2text(source) equal(result, should, source) + source = "