1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:38:11 +00:00

LibHTML: Ignore case in <!DOCTYPE> tags :^)

This commit is contained in:
Andreas Kling 2019-11-07 21:39:15 +01:00
parent 71f249fd2c
commit 0355146af9

View file

@ -168,13 +168,13 @@ static bool parse_html_document(const StringView& html, Document& document, Pare
break; break;
} }
if (ch == '!') { if (ch == '!') {
if (peek(1) == 'D' if (toupper(peek(1)) == 'D'
&& peek(2) == 'O' && toupper(peek(2)) == 'O'
&& peek(3) == 'C' && toupper(peek(3)) == 'C'
&& peek(4) == 'T' && toupper(peek(4)) == 'T'
&& peek(5) == 'Y' && toupper(peek(5)) == 'Y'
&& peek(6) == 'P' && toupper(peek(6)) == 'P'
&& peek(7) == 'E') { && toupper(peek(7)) == 'E') {
i += 7; i += 7;
move_to_state(State::InDoctype); move_to_state(State::InDoctype);
break; break;