We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e5931be commit 23ff095Copy full SHA for 23ff095
1 file changed
src/purify.js
@@ -897,7 +897,7 @@ function createDOMPurify(window = getGlobal()) {
897
}
898
899
/* Check if tagname contains Unicode */
900
- if (stringMatch(currentNode.nodeName, /[\u0080-\uFFFF]/)) {
+ if (regExpTest(/[\u0080-\uFFFF]/, currentNode.nodeName)) {
901
_forceRemove(currentNode);
902
return true;
903
@@ -913,6 +913,7 @@ function createDOMPurify(window = getGlobal()) {
913
914
/* Detect mXSS attempts abusing namespace confusion */
915
if (
916
+ currentNode.hasChildNodes() &&
917
!_isNode(currentNode.firstElementChild) &&
918
(!_isNode(currentNode.content) ||
919
!_isNode(currentNode.content.firstElementChild)) &&
0 commit comments