summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-11-07 21:39:15 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-11-07 21:39:15 +0100
commit0355146af9c3392d1ea8c58e6bd09d7df9208d16 (patch)
tree34dff7981df5bbaee3f5d23b0053caf33a906b36
parent71f249fd2cb50625e41e4bfa680932f18e983703 (diff)
downloadserenity-0355146af9c3392d1ea8c58e6bd09d7df9208d16.zip
LibHTML: Ignore case in <!DOCTYPE> tags :^)
-rw-r--r--Libraries/LibHTML/Parser/HTMLParser.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/Libraries/LibHTML/Parser/HTMLParser.cpp b/Libraries/LibHTML/Parser/HTMLParser.cpp
index cfcd32d3ea..b98bc7cb25 100644
--- a/Libraries/LibHTML/Parser/HTMLParser.cpp
+++ b/Libraries/LibHTML/Parser/HTMLParser.cpp
@@ -168,13 +168,13 @@ static bool parse_html_document(const StringView& html, Document& document, Pare
break;
}
if (ch == '!') {
- if (peek(1) == 'D'
- && peek(2) == 'O'
- && peek(3) == 'C'
- && peek(4) == 'T'
- && peek(5) == 'Y'
- && peek(6) == 'P'
- && peek(7) == 'E') {
+ if (toupper(peek(1)) == 'D'
+ && toupper(peek(2)) == 'O'
+ && toupper(peek(3)) == 'C'
+ && toupper(peek(4)) == 'T'
+ && toupper(peek(5)) == 'Y'
+ && toupper(peek(6)) == 'P'
+ && toupper(peek(7)) == 'E') {
i += 7;
move_to_state(State::InDoctype);
break;