From 9d86d2f32303ae0048f6a5daa552bacceb9b12ea Mon Sep 17 00:00:00 2001 From: Vicent Marti Date: Tue, 9 Sep 2014 04:00:36 +0200 Subject: Update the spec with better entity handling --- src/html/houdini_html_u.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/html/houdini_html_u.c b/src/html/houdini_html_u.c index 762f980..b8e2d8d 100644 --- a/src/html/houdini_html_u.c +++ b/src/html/houdini_html_u.c @@ -24,7 +24,7 @@ houdini_unescape_ent(strbuf *ob, const uint8_t *src, size_t size) codepoint = (codepoint * 16) + ((src[i] | 32) % 39 - 9); } - if (i < size && src[i] == ';') { + if (i < size && src[i] == ';' && codepoint) { utf8proc_encode_char(codepoint, ob); return i + 1; } -- cgit v1.2.3