mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-05-27 14:46:01 +03:00
Update devDependencies (#32852)
Pin karma and linkinator due to failures
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
@@ -114,6 +114,7 @@ export function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) {
|
||||
}
|
||||
|
||||
const attributeList = [].slice.call(el.attributes)
|
||||
// eslint-disable-next-line unicorn/prefer-spread
|
||||
const whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || [])
|
||||
|
||||
attributeList.forEach(attr => {
|
||||
|
||||
Reference in New Issue
Block a user