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:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user