cleanup from steve. i hope i've got all the bits right. Reference: /n/atom/patch/applied2013/xmlparsenits Date: Wed Nov 27 00:00:14 CET 2013 Signed-off-by: quanstro@quanstro.net --- /sys/src/libxml/xmlparse.c Tue Nov 26 23:59:53 2013 +++ /sys/src/libxml/xmlparse.c Tue Nov 26 23:59:53 2013 @@ -152,6 +152,7 @@ { "gt", L'>' }, { "apos", L'\'' }, { "quot", L'"' }, + { "copy", L'©' }, { "nbsp", 0xa0 }, /* no-break space */ }; @@ -194,7 +195,9 @@ if(memcmp(Entities[i].name, buf, l) == 0) return Entities[i].rune; - fprint(2, "%d: '&%s;' unknown/unsupported entity reference\n", st->line, buf); + for(i = --l; i >= 0; i--) + unget(st, buf[i]); + fprint(2, "%d: '%s' unknown/unsupported entity reference\n", st->line, buf); return L'?'; }