Skip to content

Commit

Permalink
fix: Fixed a faulty edit and changed the code acccordingly
Browse files Browse the repository at this point in the history
  • Loading branch information
cure53 committed Apr 24, 2024
1 parent 65d35b8 commit 6dbc2bd
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion 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.

2 changes: 1 addition & 1 deletion dist/purify.es.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1274,12 +1274,12 @@ function createDOMPurify() {

/* Remove an element if nested too deeply to avoid mXSS */
if (shadowNode.__depth >= MAX_NESTING_DEPTH) {
shadowNode.content.__depth = shadowNode.__depth;
_forceRemove(shadowNode);
}

/* Deep shadow DOM detected */
if (shadowNode.content instanceof DocumentFragment) {
shadowNode.content.__depth = shadowNode.__depth;
_sanitizeShadowDOM(shadowNode.content);
}

Expand Down
2 changes: 1 addition & 1 deletion dist/purify.es.mjs.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion 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.

2 changes: 1 addition & 1 deletion src/purify.js
Original file line number Diff line number Diff line change
Expand Up @@ -1390,12 +1390,12 @@ function createDOMPurify(window = getGlobal()) {

/* Remove an element if nested too deeply to avoid mXSS */
if (shadowNode.__depth >= MAX_NESTING_DEPTH) {
shadowNode.content.__depth = shadowNode.__depth;
_forceRemove(shadowNode);
}

/* Deep shadow DOM detected */
if (shadowNode.content instanceof DocumentFragment) {
shadowNode.content.__depth = shadowNode.__depth;
_sanitizeShadowDOM(shadowNode.content);
}

Expand Down

0 comments on commit 6dbc2bd

Please sign in to comment.