fix title parsing fix from webdump - grabtitle - stupid HTML title grabber
HTML git clone git://git.codemadness.org/grabtitle
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
DIR commit 8e8725ada0be29cc3d0f7d43188eee98e091ccc4
DIR parent 14f8fe32c30e3571385a8aa6213e8b286414a1c1
HTML Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Fri, 3 Jul 2026 23:02:53 +0200
fix title parsing fix from webdump
Diffstat:
M grabtitle.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
DIR diff --git a/grabtitle.c b/grabtitle.c
@@ -51,7 +51,7 @@ pushback:
if (pushtagend) {
parser.getnext = getnext; /* restore */
getnext_literal_init(); /* reset */
- return '\0';
+ return '>'; /* end tag */
}
getnext_literal_init(); /* reset */
} else {
@@ -71,7 +71,7 @@ pushback:
pushend = pushbuf + strlen(endtagmatch) - 1; /* except NUL byte */
pushtagend = pushend; /* offset of where the tag ended */
}
- return '\0'; /* NUL byte (this should be ignored by the reader) */
+ goto pushback;
} else {
/* incomplete tag, fake incomplete leading "<" as data entity "<". */
if (ignorestate != endtagmatch) {