fix: raw text end tags should be case insensitive
This commit is contained in:
parent
0a4bfb63a6
commit
15c9cdb62f
|
@ -161,9 +161,11 @@ Raw text elements
|
|||
(raw_text)
|
||||
(end_tag (tag_name)))
|
||||
(text)
|
||||
(ERROR
|
||||
(script_element
|
||||
(start_tag (tag_name))
|
||||
(raw_text)))
|
||||
(raw_text)
|
||||
(end_tag (tag_name)))
|
||||
(text))
|
||||
|
||||
==================================
|
||||
All-caps doctype
|
||||
|
|
|
@ -123,12 +123,12 @@ struct Scanner {
|
|||
lexer->mark_end(lexer);
|
||||
|
||||
const string &end_delimiter = tags.back().type == SCRIPT
|
||||
? "</script"
|
||||
: "</style";
|
||||
? "</SCRIPT"
|
||||
: "</STYLE";
|
||||
|
||||
unsigned delimiter_index = 0;
|
||||
while (lexer->lookahead) {
|
||||
if (lexer->lookahead == end_delimiter[delimiter_index]) {
|
||||
if (towupper(lexer->lookahead) == end_delimiter[delimiter_index]) {
|
||||
delimiter_index++;
|
||||
if (delimiter_index == end_delimiter.size()) break;
|
||||
lexer->advance(lexer, false);
|
||||
|
|
Loading…
Reference in New Issue