[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
parent a81455e81c
commit 5769722c58
19 changed files with 57 additions and 204 deletions

View File

@ -191,7 +191,11 @@ func init() {
// New returns a new CSS scanner for the given input.
func New(input string) *Scanner {
// Normalize newlines.
// https://www.w3.org/TR/css-syntax-3/#input-preprocessing
input = strings.Replace(input, "\r\n", "\n", -1)
input = strings.Replace(input, "\r", "\n", -1)
input = strings.Replace(input, "\f", "\n", -1)
input = strings.Replace(input, "\u0000", "\ufffd", -1)
return &Scanner{
input: input,
row: 1,
@ -232,7 +236,7 @@ func (s *Scanner) Next() *Token {
// shortcut before testing multiple regexps.
input := s.input[s.pos:]
switch input[0] {
case '\t', '\n', '\f', '\r', ' ':
case '\t', '\n', ' ':
// Whitespace.
return s.emitToken(TokenS, matchers[TokenS].FindString(input))
case '.':