Skip to content

Commit

Permalink
Update DOMPurify to version 1.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyennv committed May 8, 2018
1 parent 30d469b commit 73a52e3
Show file tree
Hide file tree
Showing 9 changed files with 60 additions and 28 deletions.
15 changes: 13 additions & 2 deletions openpgp_zimbra_secure/js/DOMPurify/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

DOMPurify is a DOM-only, super-fast, uber-tolerant XSS sanitizer for HTML, MathML and SVG.

It's also very simple to use and get started with. DOMPurify was [started in February 2014](https://github.com/cure53/DOMPurify/commit/a630922616927373485e0e787ab19e73e3691b2b) and, meanwhile, has reached version 1.0.3!
It's also very simple to use and get started with. DOMPurify was [started in February 2014](https://github.com/cure53/DOMPurify/commit/a630922616927373485e0e787ab19e73e3691b2b) and, meanwhile, has reached version 1.0.4!

DOMPurify is written in JavaScript and works in all modern browsers (Safari, Opera (15+), Internet Explorer (10+), Edge, Firefox and Chrome - as well as almost anything else using Blink or WebKit). It doesn't break on MSIE6 or other legacy browsers. It either uses [a fall-back](#what-about-older-browsers-like-msie8) or simply does nothing.

Expand Down Expand Up @@ -55,7 +55,7 @@ DOMPurify also works server-side with node.js as well as client-side via [Browse
```bash
npm install dompurify
```

For JSDOM v10 or newer
```javascript
const createDOMPurify = require('dompurify');
const { JSDOM } = require('jsdom');
Expand All @@ -66,6 +66,17 @@ const DOMPurify = createDOMPurify(window);
const clean = DOMPurify.sanitize(dirty);
```

For JSDOM versions older than v10
```javascript
const createDOMPurify = require('dompurify');
const jsdom = require('jsdom').jsdom;

const window = jsdom('').defaultView;
const DOMPurify = createDOMPurify(window);

const clean = DOMPurify.sanitize(dirty);
```

## Is there a demo?

Of course there is a demo! [Play with DOMPurify](https://cure53.de/purify)
Expand Down
21 changes: 14 additions & 7 deletions openpgp_zimbra_secure/js/DOMPurify/purify.cjs.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion openpgp_zimbra_secure/js/DOMPurify/purify.cjs.js.map

Large diffs are not rendered by default.

21 changes: 14 additions & 7 deletions openpgp_zimbra_secure/js/DOMPurify/purify.es.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion openpgp_zimbra_secure/js/DOMPurify/purify.es.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit 73a52e3

Please sign in to comment.