Selaa lähdekoodia

HUE-7889 [frontend] Remove html page source from the notifications

Enrico Berti 7 vuotta sitten
vanhempi
commit
41a7733ec7
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      desktop/core/src/desktop/static/desktop/js/jquery.notify.js

+ 1 - 1
desktop/core/src/desktop/static/desktop/js/jquery.notify.js

@@ -48,7 +48,7 @@
     var _this = this;
     var MARGIN = 4;
 
-    _this.options.message = $.trim($("<span>").text(_this.options.message).html()); // escape HTML messages
+    _this.options.message = _this.options.message.replace(/(<([^>]+)>)/ig, ''); // escape HTML messages
 
     if (_this.options.message !== '' && $(".jHueNotify .message").last().text() !== _this.options.message) {