summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Sidwell <andy@entai.co.uk>2008-06-17 04:23:35 +0000
committerAndrew Sidwell <andy@entai.co.uk>2008-06-17 04:23:35 +0000
commitb1835ffcffeab859740403e9ef5232a769804ef3 (patch)
tree42e96ef6ffaba517ce4934209583fb33c7feae1a /src
parent9dd96deaf640232f359a001c56914e40104689d3 (diff)
downloadlibhubbub-b1835ffcffeab859740403e9ef5232a769804ef3.tar.gz
libhubbub-b1835ffcffeab859740403e9ef5232a769804ef3.tar.bz2
Fix some doctype bugs.
svn path=/trunk/hubbub/; revision=4371
Diffstat (limited to 'src')
-rw-r--r--src/tokeniser/tokeniser.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/tokeniser/tokeniser.c b/src/tokeniser/tokeniser.c
index 20eea4e..87947de 100644
--- a/src/tokeniser/tokeniser.c
+++ b/src/tokeniser/tokeniser.c
@@ -2292,11 +2292,11 @@ bool hubbub_tokeniser_handle_after_doctype_name(hubbub_tokeniser *tokeniser)
hubbub_tokeniser_emit_token(tokeniser, &token);
tokeniser->state = HUBBUB_TOKENISER_STATE_DATA;
- } else if (c == 'P') {
+ } else if ((c & ~0x20) == 'P') {
tokeniser->state = HUBBUB_TOKENISER_STATE_MATCH_PUBLIC;
tokeniser->context.match_doctype.count = 1;
hubbub_inputstream_advance(tokeniser->input);
- } else if (c == 'S') {
+ } else if ((c & ~0x20) == 'S') {
tokeniser->state = HUBBUB_TOKENISER_STATE_MATCH_SYSTEM;
tokeniser->context.match_doctype.count = 1;
hubbub_inputstream_advance(tokeniser->input);
@@ -2376,6 +2376,7 @@ bool hubbub_tokeniser_handle_before_doctype_public(hubbub_tokeniser *tokeniser)
/* Emit doctype */
token.type = HUBBUB_TOKEN_DOCTYPE;
token.data.doctype = tokeniser->context.current_doctype;
+ token.data.doctype.force_quirks = true;
hubbub_tokeniser_emit_token(tokeniser, &token);
@@ -2704,7 +2705,7 @@ bool hubbub_tokeniser_handle_doctype_system_sq(hubbub_tokeniser *tokeniser)
if (c == HUBBUB_INPUTSTREAM_OOD)
return false;
- if (c == '"') {
+ if (c == '\'') {
tokeniser->state = HUBBUB_TOKENISER_STATE_AFTER_DOCTYPE_SYSTEM;
hubbub_inputstream_advance(tokeniser->input);
} else if (c == '>') {