From ac6faf536cf1df66082fbb452e84f080c1849c70 Mon Sep 17 00:00:00 2001 From: Andrew Sidwell Date: Mon, 16 Jun 2008 14:46:59 +0000 Subject: Prevent an infinite loop; get entity matcher a tiny bit further towards compliance. svn path=/trunk/hubbub/; revision=4364 --- src/tokeniser/tokeniser.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') 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); -- cgit v1.2.3