Update devDependencies
This commit is contained in:
parent
80aefd862c
commit
c9b3aa426a
4 changed files with 222 additions and 349 deletions
|
|
@ -71,7 +71,7 @@ function allowedAttribute(attr, allowedAttributeList) {
|
|||
|
||||
if (allowedAttributeList.indexOf(attrName) !== -1) {
|
||||
if (uriAttrs.indexOf(attrName) !== -1) {
|
||||
return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN))
|
||||
return Boolean(SAFE_URL_PATTERN.test(attr.nodeValue) || DATA_URL_PATTERN.test(attr.nodeValue))
|
||||
}
|
||||
|
||||
return true
|
||||
|
|
@ -81,7 +81,7 @@ function allowedAttribute(attr, allowedAttributeList) {
|
|||
|
||||
// Check if a regular expression validates the attribute.
|
||||
for (let i = 0, len = regExp.length; i < len; i++) {
|
||||
if (attrName.match(regExp[i])) {
|
||||
if (regExp[i].test(attrName)) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue