diff --git a/app/assets/javascripts/discourse-shims.js b/app/assets/javascripts/discourse-shims.js index d6ccfbeea11..384fb92af2c 100644 --- a/app/assets/javascripts/discourse-shims.js +++ b/app/assets/javascripts/discourse-shims.js @@ -25,6 +25,10 @@ define("bootbox", ["exports"], function (__exports__) { __exports__.default = window.bootbox; }); +define("xss", ["exports"], function (__exports__) { + __exports__.default = window.filterXSS; +}); + define("mousetrap", ["exports"], function (__exports__) { __exports__.default = window.Mousetrap; }); diff --git a/app/assets/javascripts/pretty-text-bundle.js b/app/assets/javascripts/pretty-text-bundle.js index 62dd6c1439c..2a3862f8d46 100644 --- a/app/assets/javascripts/pretty-text-bundle.js +++ b/app/assets/javascripts/pretty-text-bundle.js @@ -6,7 +6,6 @@ //= require ./pretty-text/addon/emoji //= require ./pretty-text/addon/engines/discourse-markdown-it //= require xss.min -//= require ./pretty-text/addon/xss //= require ./pretty-text/addon/white-lister //= require ./pretty-text/addon/sanitizer //= require ./pretty-text/addon/oneboxer diff --git a/app/assets/javascripts/pretty-text/addon/sanitizer.js b/app/assets/javascripts/pretty-text/addon/sanitizer.js index 26eef201a13..aaf80055b5c 100644 --- a/app/assets/javascripts/pretty-text/addon/sanitizer.js +++ b/app/assets/javascripts/pretty-text/addon/sanitizer.js @@ -1,4 +1,4 @@ -import xss from "pretty-text/xss"; +import xss from "xss"; function attr(name, value) { if (value) { diff --git a/app/assets/javascripts/pretty-text/addon/xss.js b/app/assets/javascripts/pretty-text/addon/xss.js deleted file mode 100644 index d2189b1211b..00000000000 --- a/app/assets/javascripts/pretty-text/addon/xss.js +++ /dev/null @@ -1,2 +0,0 @@ -// Shim for xss.js library -export default window.filterXSS;