mirror of
https://github.com/documize/community.git
synced 2025-07-25 16:19:46 +02:00
Bump version to 5.11.0
This commit is contained in:
parent
a32510b8e6
commit
510e1bd0bd
370 changed files with 18825 additions and 5454 deletions
17
vendor/github.com/microcosm-cc/bluemonday/helpers.go
generated
vendored
17
vendor/github.com/microcosm-cc/bluemonday/helpers.go
generated
vendored
|
@ -117,7 +117,7 @@ var (
|
|||
// This is not exported as it's not useful by itself, and only has value
|
||||
// within the AllowDataURIImages func
|
||||
dataURIImagePrefix = regexp.MustCompile(
|
||||
`^image/(gif|jpeg|png|webp);base64,`,
|
||||
`^image/(gif|jpeg|png|svg\+xml|webp);base64,`,
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -193,10 +193,11 @@ func (p *Policy) AllowImages() {
|
|||
// http://en.wikipedia.org/wiki/Data_URI_scheme
|
||||
//
|
||||
// Images must have a mimetype matching:
|
||||
// image/gif
|
||||
// image/jpeg
|
||||
// image/png
|
||||
// image/webp
|
||||
//
|
||||
// image/gif
|
||||
// image/jpeg
|
||||
// image/png
|
||||
// image/webp
|
||||
//
|
||||
// NOTE: There is a potential security risk to allowing data URIs and you should
|
||||
// only permit them on content you already trust.
|
||||
|
@ -221,11 +222,7 @@ func (p *Policy) AllowDataURIImages() {
|
|||
}
|
||||
|
||||
_, err := base64.StdEncoding.DecodeString(url.Opaque[len(matched):])
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
return err == nil
|
||||
},
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue