summaryrefslogtreecommitdiff
path: root/src/tokeniser
diff options
context:
space:
mode:
authorAndrew Sidwell <andy@entai.co.uk>2008-06-16 14:46:59 +0000
committerAndrew Sidwell <andy@entai.co.uk>2008-06-16 14:46:59 +0000
commitac6faf536cf1df66082fbb452e84f080c1849c70 (patch)
tree9a2f751d95db5b79be1c3d2c2691f997d58f8ccb /src/tokeniser
parent622f2b6b7736fe8799845cb577ae677599541aee (diff)
downloadlibhubbub-ac6faf536cf1df66082fbb452e84f080c1849c70.tar.gz
libhubbub-ac6faf536cf1df66082fbb452e84f080c1849c70.tar.bz2
Prevent an infinite loop; get entity matcher a tiny bit further towards compliance.
svn path=/trunk/hubbub/; revision=4364
Diffstat (limited to 'src/tokeniser')
-rw-r--r--src/tokeniser/tokeniser.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tokeniser/tokeniser.c b/src/tokeniser/tokeniser.c
index bc460df..a5a35a0 100644
--- a/src/tokeniser/tokeniser.c
+++ b/src/tokeniser/tokeniser.c
@@ -2951,6 +2951,9 @@ bool hubbub_tokeniser_consume_character_reference(hubbub_tokeniser *tokeniser)
if (c == '\t' || c == '\n' || c == '\f' || c == ' ' ||
c == '<' || c == '&' || c == HUBBUB_INPUTSTREAM_EOF ||
(allowed_char && c == allowed_char)) {
+ tokeniser->context.match_entity.complete = true;
+ /* rewind to the '&' (de-consume) */
+ hubbub_inputstream_rewind(tokeniser->input, 1);
return true;
} else if (c == '#') {
pos = hubbub_inputstream_cur_pos(tokeniser->input, &len);