Skip to content

Commit

Permalink
HTML: don't lowercase attribute name with templates
Browse files Browse the repository at this point in the history
  • Loading branch information
tdewolff committed Oct 30, 2023
1 parent 6a5fe33 commit 79249a3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion html/lex.go
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,7 @@ func (l *Lexer) shiftAttribute() []byte {
}
break
}
nameHasTmpl := l.hasTmpl
if c == '=' {
l.r.Move(1)
for { // before attribute value state
Expand Down Expand Up @@ -448,7 +449,10 @@ func (l *Lexer) shiftAttribute() []byte {
l.moveTemplate()
l.hasTmpl = true
}
l.text = parse.ToLower(l.r.Lexeme()[nameStart:nameEnd])
l.text = l.r.Lexeme()[nameStart:nameEnd]
if !nameHasTmpl {
l.text = parse.ToLower(l.text)
}
return l.r.Shift()
}

Expand Down

0 comments on commit 79249a3

Please sign in to comment.