Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/util/sanitizer.js')
-rw-r--r--js/src/util/sanitizer.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/js/src/util/sanitizer.js b/js/src/util/sanitizer.js
index c02a4eb906..e27961e9a3 100644
--- a/js/src/util/sanitizer.js
+++ b/js/src/util/sanitizer.js
@@ -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