mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-08 22:56:46 +02: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