[chore]: Bump github.com/microcosm-cc/bluemonday from 1.0.26 to 1.0.27 (#3081)

This commit is contained in:
dependabot[bot] 2024-07-08 07:34:39 +00:00 committed by GitHub
commit 5769722c58
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 57 additions and 204 deletions

View file

@ -529,9 +529,11 @@ attrsLoop:
if ap.regexp != nil {
if ap.regexp.MatchString(htmlAttr.Val) {
cleanAttrs = append(cleanAttrs, htmlAttr)
continue attrsLoop
}
} else {
cleanAttrs = append(cleanAttrs, htmlAttr)
continue attrsLoop
}
}
}
@ -762,10 +764,10 @@ attrsLoop:
switch elementName {
case "audio", "img", "link", "script", "video":
var crossOriginFound bool
for _, htmlAttr := range cleanAttrs {
for i, htmlAttr := range cleanAttrs {
if htmlAttr.Key == "crossorigin" {
crossOriginFound = true
htmlAttr.Val = "anonymous"
cleanAttrs[i].Val = "anonymous"
}
}
@ -1087,3 +1089,8 @@ func normaliseElementName(str string) string {
`"`,
)
}
type stringWriterWriter interface {
io.Writer
io.StringWriter
}