2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-05 16:42:29 +03:00

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.
This commit is contained in:
XhmikosR
2021-10-07 17:48:36 +03:00
committed by GitHub
parent 9ff87f5f0e
commit 64e13162fa
2 changed files with 26 additions and 1 deletions
+1 -1
View File
@@ -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 = {