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

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/purify.es.js
2 changes: 1 addition & 1 deletion dist/purify.es.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/purify.js
2 changes: 1 addition & 1 deletion dist/purify.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/purify.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/purify.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
},
"name": "dompurify",
"description": "DOMPurify is a DOM-only, super-fast, uber-tolerant XSS sanitizer for HTML, MathML and SVG. It's written in JavaScript and works in all modern browsers (Safari, Opera (15+), Internet Explorer (10+), Firefox and Chrome - as well as almost anything else using Blink or WebKit). DOMPurify is written by security people who have vast background in web attacks and XSS. Fear not.",
"version": "2.0.16",
"version": "2.0.17",
"directories": {
"test": "test"
},
Expand Down
2 changes: 1 addition & 1 deletion src/purify.js
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ function createDOMPurify(window = getGlobal()) {
/* Take care of an mXSS pattern using p, br inside svg, math */
if (
(tagName === 'svg' || tagName === 'math') &&
currentNode.querySelectorAll('p, br, form').length !== 0
currentNode.querySelectorAll('p, br, form, table').length !== 0
) {
_forceRemove(currentNode);
return true;
Expand Down
8 changes: 7 additions & 1 deletion test/fixtures/expect.js
Original file line number Diff line number Diff line change
Expand Up @@ -1075,11 +1075,17 @@ module.exports = [
"<svg></svg><b><style><b title='</style><img>'&gt;</b>"
]
}, {
"title": "Tests against nesting-based mXSS behavior 1/1",
"title": "Tests against nesting-based mXSS behavior 1/2",
"payload": "<form><math><mtext></form><form><mglyph><style><img>",
"expected": [
"<form></form>"
]
}, {
"title": "Tests against nesting-based mXSS behavior 2/2",
"payload": "<math><mtext><table><mglyph><style><math>CLICKME</math>",
"expected": [
""
]
}, {
"title": "Tests against proper handling of leading whitespaces",
"payload": " ",
Expand Down
4 changes: 2 additions & 2 deletions website/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<meta charset="UTF-8">
<title>DOMPurify 2.0.16 "Tanky Traya"</title>
<title>DOMPurify 2.0.17 "Fast Forward"</title>
<script src="../dist/purify.min.js"></script>
<!-- we don't actually need it - just to demo and test the $(html) sanitation -->
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
Expand All @@ -23,7 +23,7 @@
</script>
</head>
<body>
<h4>DOMPurify 2.0.16 "Tanky Traya"</h4>
<h4>DOMPurify 2.0.17 "Fast Forward"</h4>
<p>
<a href="http://badge.fury.io/js/dompurify" rel="nofollow"><img alt="npm version" src="https://badge.fury.io/js/dompurify.svg"></a>
<a target="_blank" rel="noopener noreferrer" href="https://github.com/cure53/DOMPurify/workflows/Build%20and%20Test/badge.svg?branch=main"><img src="https://github.com/cure53/DOMPurify/workflows/Build%20and%20Test/badge.svg?branch=main" alt="Build and Test"></a>
Expand Down