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
path: root/js/src/util
diff options
context:
space:
mode:
authorXhmikosR <xhmikosr@gmail.com>2021-10-07 17:48:36 +0300
committerGitHub <noreply@github.com>2021-10-07 17:48:36 +0300
commit64e13162faa692aa2d12071ad9a14a3ac1b08a6f (patch)
treeba54284addb11feecc37d7e00af42528868c2c7a /js/src/util
parent9ff87f5f0ef9d35af922ee2833deb875908686d6 (diff)
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/util')
-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 f5a8287cd0..232416f3ab 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 = {