Revert "Create proper shim for xss library"

Revert “Create proper shim for xss library”

This reverts commit 30e91125356e3e034bd804d4725065e327280ad4.

diff --git a/app/assets/javascripts/discourse-shims.js b/app/assets/javascripts/discourse-shims.js
index 384fb92..d6ccfbe 100644
--- a/app/assets/javascripts/discourse-shims.js
+++ b/app/assets/javascripts/discourse-shims.js
@@ -25,10 +25,6 @@ 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 2a3862f..62dd6c1 100644
--- a/app/assets/javascripts/pretty-text-bundle.js
+++ b/app/assets/javascripts/pretty-text-bundle.js
@@ -6,6 +6,7 @@
 //= 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 aaf8005..26eef20 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 "xss";
+import xss from "pretty-text/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
new file mode 100644
index 0000000..d2189b1
--- /dev/null
+++ b/app/assets/javascripts/pretty-text/addon/xss.js
@@ -0,0 +1,2 @@
+// Shim for xss.js library
+export default window.filterXSS;

GitHub sha: e3b4632f