aboutsummaryrefslogtreecommitdiff
path: root/js/src
diff options
context:
space:
mode:
authorXhmikosR <[email protected]>2021-10-07 17:48:36 +0300
committerGitHub <[email protected]>2021-10-07 17:48:36 +0300
commit64e13162faa692aa2d12071ad9a14a3ac1b08a6f (patch)
treeba54284addb11feecc37d7e00af42528868c2c7a /js/src
parent9ff87f5f0ef9d35af922ee2833deb875908686d6 (diff)
downloadbootstrap-64e13162faa692aa2d12071ad9a14a3ac1b08a6f.tar.xz
bootstrap-64e13162faa692aa2d12071ad9a14a3ac1b08a6f.zip
Sanitizer: fix logic and add a test. (#35133)
This was broken in 2596c97 inadvertently. Added a test so that we don't hit this in the future.
Diffstat (limited to 'js/src')
-rw-r--r--js/src/util/sanitizer.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/js/src/util/sanitizer.js b/js/src/util/sanitizer.js
index f5a8287cd..232416f3a 100644
--- a/js/src/util/sanitizer.js
+++ b/js/src/util/sanitizer.js
@@ -45,7 +45,7 @@ const allowedAttribute = (attribute, allowedAttributeList) => {
// Check if a regular expression validates the attribute.
return allowedAttributeList.filter(attributeRegex => attributeRegex instanceof RegExp)
- .every(regex => regex.test(attributeName))
+ .some(regex => regex.test(attributeName))
}
export const DefaultAllowlist = {