url-sanitizer 0.8.3 → 0.8.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -21,9 +21,14 @@ npm i url-sanitizer
21
21
  For browsers and web sites, standalone ESM builds are available in `dist/` directory.
22
22
  * node_modules/url-sanitizer/dist/url-sanitizer.js
23
23
  * node_modules/url-sanitizer/dist/url-sanitizer.min.js
24
+ * node_modules/url-sanitizer/dist/url-sanitizer.wo.dompurify.js
25
+ * node_modules/url-sanitizer/dist/url-sanitizer.wo.dompurify.min.js
24
26
 
25
27
  Or, download them from [Releases](https://github.com/asamuzaK/urlSanitizer/releases).
26
28
 
29
+ NOTE: `url-sanitizer.wo.dompurify.js` and `url-sanitizer.wo.dompurify.min.js` are built without [DOMPurify](https://www.npmjs.com/package/dompurify).
30
+ Use them if DOMPurify is exposed as `window.DOMPurify`.
31
+
27
32
 
28
33
  ## Usage
29
34
 
@@ -94,7 +99,7 @@ const blob4 = new Blob(['<svg><g onload="alert(1)"/></svg>'], {
94
99
  type: 'image/svg+xml'
95
100
  });
96
101
  const url4 = URL.createObjectURL(blob4);
97
- const res4 = await func(url, {
102
+ const res4 = await func(url4, {
98
103
  allow: ['blob']
99
104
  });
100
105
  // => 'data:image/svg+xml,%3Csvg%3E%3Cg%3E%3C/g%3E%3C/svg%3E'
@@ -384,7 +389,7 @@ const res2 = urlSanitizer.remove('foo');
384
389
 
385
390
  The following resources have been of great help in the development of the URL Sanitizer.
386
391
 
387
- * [DOMPurify](https://www.npmjs.com/package/dompurify?activeTab=readme)
392
+ * [DOMPurify](https://www.npmjs.com/package/dompurify)
388
393
  * [Uniform Resource Identifier (URI) Schemes - IANA](https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml)
389
394
  * [Encoding -- determine the character encoding of a text file. - file/file](https://github.com/file/file/blob/master/src/encoding.c)
390
395