Fix data URI scramble (#16098)
* Removed unused method. * No prefix for data uris. * Added test to prevent regressions.
This commit is contained in:
parent
0909695204
commit
21cde5c439
4 changed files with 23 additions and 19 deletions
|
@ -131,13 +131,3 @@ func SanitizeReader(r io.Reader) *bytes.Buffer {
|
|||
NewSanitizer()
|
||||
return sanitizer.policy.SanitizeReader(r)
|
||||
}
|
||||
|
||||
// SanitizeBytes takes a []byte slice that contains a HTML fragment or document and applies policy whitelist.
|
||||
func SanitizeBytes(b []byte) []byte {
|
||||
if len(b) == 0 {
|
||||
// nothing to sanitize
|
||||
return b
|
||||
}
|
||||
NewSanitizer()
|
||||
return sanitizer.policy.SanitizeBytes(b)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue