mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-05 11:09:31 -06:00
[chore] Update all but bun libraries (#526)
* update all but bun libraries Signed-off-by: kim <grufwub@gmail.com> * remove my personal build script changes Signed-off-by: kim <grufwub@gmail.com>
This commit is contained in:
parent
e06bf9cc9a
commit
b56dae8120
350 changed files with 305366 additions and 5943 deletions
29
vendor/github.com/microcosm-cc/bluemonday/sanitize.go
generated
vendored
29
vendor/github.com/microcosm-cc/bluemonday/sanitize.go
generated
vendored
|
|
@ -240,7 +240,7 @@ func (p *Policy) sanitize(r io.Reader, w io.Writer) error {
|
|||
// rather than:
|
||||
// p := bluemonday.NewPolicy()
|
||||
// If this is the case, and if they haven't yet triggered an action that
|
||||
// would initiliaze the maps, then we need to do that.
|
||||
// would initialize the maps, then we need to do that.
|
||||
p.init()
|
||||
|
||||
buff, ok := w.(stringWriterWriter)
|
||||
|
|
@ -809,6 +809,33 @@ attrsLoop:
|
|||
}
|
||||
}
|
||||
|
||||
if p.requireSandboxOnIFrame != nil && elementName == "iframe" {
|
||||
var sandboxFound bool
|
||||
for i, htmlAttr := range cleanAttrs {
|
||||
if htmlAttr.Key == "sandbox" {
|
||||
sandboxFound = true
|
||||
var cleanVals []string
|
||||
cleanValsSet := make(map[string]bool)
|
||||
for _, val := range strings.Fields(htmlAttr.Val) {
|
||||
if p.requireSandboxOnIFrame[val] {
|
||||
if !cleanValsSet[val] {
|
||||
cleanVals = append(cleanVals, val)
|
||||
cleanValsSet[val] = true
|
||||
}
|
||||
}
|
||||
}
|
||||
cleanAttrs[i].Val = strings.Join(cleanVals, " ")
|
||||
}
|
||||
}
|
||||
|
||||
if !sandboxFound {
|
||||
sandbox := html.Attribute{}
|
||||
sandbox.Key = "sandbox"
|
||||
sandbox.Val = ""
|
||||
cleanAttrs = append(cleanAttrs, sandbox)
|
||||
}
|
||||
}
|
||||
|
||||
return cleanAttrs
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue