Improved dicarding of text in the HTML header.

Plain text in the HTML header (think of <title>text</title>) is collected as usual. The decision to discard it is triggered by the first withspace following. In the usual case of the <body> no preceeded by any whitespace this means that by the point the first whitespace is encountered we're not in "discard mode" anymore and therefore incorrectly render the text.

Explicitly calling do_word() just before leaving "discard mode" discards all text collected so far.
This commit is contained in:
Oliver Schmidt 2016-10-11 11:25:31 +02:00
parent 72cc19c680
commit 957ac63a7c

View file

@ -410,6 +410,7 @@ parse_tag(void)
switch_majorstate(s.lastmajorstate); switch_majorstate(s.lastmajorstate);
break; break;
case TAG_BODY: case TAG_BODY:
do_word();
s.majorstate = s.lastmajorstate = MAJORSTATE_BODY; s.majorstate = s.lastmajorstate = MAJORSTATE_BODY;
break; break;
case TAG_IMG: case TAG_IMG: