mirror of
https://github.com/Hopiu/bootstrap.git
synced 2026-04-07 06:40:57 +00:00
This partially reverts commit 9c2b9ac74d.
This commit is contained in:
parent
97eb2c1e24
commit
b07b342086
1 changed files with 2 additions and 2 deletions
|
|
@ -37,7 +37,7 @@ const allowedAttribute = (attr, allowedAttributeList) => {
|
|||
|
||||
if (allowedAttributeList.indexOf(attrName) !== -1) {
|
||||
if (uriAttrs.indexOf(attrName) !== -1) {
|
||||
return SAFE_URL_PATTERN.test(attr.nodeValue) || DATA_URL_PATTERN.test(attr.nodeValue)
|
||||
return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN))
|
||||
}
|
||||
|
||||
return true
|
||||
|
|
@ -47,7 +47,7 @@ const allowedAttribute = (attr, allowedAttributeList) => {
|
|||
|
||||
// Check if a regular expression validates the attribute.
|
||||
for (let i = 0, len = regExp.length; i < len; i++) {
|
||||
if (regExp[i].test(attrName)) {
|
||||
if (attrName.match(regExp[i])) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue