diff options
author | XhmikosR <xhmikosr@gmail.com> | 2021-10-07 17:48:36 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-07 17:48:36 +0300 |
commit | 64e13162faa692aa2d12071ad9a14a3ac1b08a6f (patch) | |
tree | ba54284addb11feecc37d7e00af42528868c2c7a /js/src/util/sanitizer.js | |
parent | 9ff87f5f0ef9d35af922ee2833deb875908686d6 (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/sanitizer.js')
-rw-r--r-- | js/src/util/sanitizer.js | 2 |
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 = { |