Skip to content

Commit b6818ce

Browse files
committed
fix: Added better configurability for new comment behavior
1 parent aafd7a8 commit b6818ce

File tree

9 files changed

+13
-13
lines changed

9 files changed

+13
-13
lines changed

dist/purify.cjs.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/purify.cjs.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/purify.es.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1205,8 +1205,8 @@ function createDOMPurify() {
12051205
continue;
12061206
}
12071207

1208-
/* Work around a security issue with comments inside attribites */
1209-
if (regExpTest(/(--!?|])>/i, value)) {
1208+
/* Work around a security issue with comments inside attributes */
1209+
if (SAFE_FOR_XML && regExpTest(/(--!?|])>/i, value)) {
12101210
_removeAttribute(name, currentNode);
12111211
continue;
12121212
}

dist/purify.es.mjs.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/purify.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/purify.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/purify.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/purify.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/purify.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1311,8 +1311,8 @@ function createDOMPurify(window = getGlobal()) {
13111311
continue;
13121312
}
13131313

1314-
/* Work around a security issue with comments inside attribites */
1315-
if (regExpTest(/(--!?|])>/i, value)) {
1314+
/* Work around a security issue with comments inside attributes */
1315+
if (SAFE_FOR_XML && regExpTest(/(--!?|])>/i, value)) {
13161316
_removeAttribute(name, currentNode);
13171317
continue;
13181318
}

0 commit comments

Comments
 (0)