Skip to content

Commit

Permalink
fix: Added better configurability for new comment behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
cure53 committed May 7, 2024
1 parent aafd7a8 commit b6818ce
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions dist/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 dist/purify.cjs.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/purify.es.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1205,8 +1205,8 @@ function createDOMPurify() {
continue;
}

/* Work around a security issue with comments inside attribites */
if (regExpTest(/(--!?|])>/i, value)) {
/* Work around a security issue with comments inside attributes */
if (SAFE_FOR_XML && regExpTest(/(--!?|])>/i, value)) {
_removeAttribute(name, currentNode);
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion dist/purify.es.mjs.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/purify.js

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

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.

4 changes: 2 additions & 2 deletions src/purify.js
Original file line number Diff line number Diff line change
Expand Up @@ -1311,8 +1311,8 @@ function createDOMPurify(window = getGlobal()) {
continue;
}

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

0 comments on commit b6818ce

Please sign in to comment.