mirror of
https://github.com/twbs/bootstrap.git
synced 2025-09-29 23:09:05 +02:00
Enable unicorn/no-array-for-each
rule
This commit is contained in:
@@ -114,11 +114,11 @@ export function sanitizeHtml(unsafeHtml, allowList, sanitizeFn) {
|
||||
const attributeList = [].concat(...element.attributes)
|
||||
const allowedAttributes = [].concat(allowList['*'] || [], allowList[elementName] || [])
|
||||
|
||||
attributeList.forEach(attribute => {
|
||||
for (const attribute of attributeList) {
|
||||
if (!allowedAttribute(attribute, allowedAttributes)) {
|
||||
element.removeAttribute(attribute.nodeName)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
return createdDocument.body.innerHTML
|
||||
|
Reference in New Issue
Block a user