On Sat, Jul 02, 2005 at 02:57:49PM +0200, Wim De Smet wrote:
Hey,
What exactly do the EndTag en TagLevel fields in the TagInfo struct stand for? I was going to add the "q" function but I'm not sure what I should fill in here. (and it wasn't directly clear from the otherwise excellent src docs).
EndTag holds whether the end tag of the HTML element is "Required", "Optional" or "Forbidden" as of the HTML 4.01 SPEC. TagLevel is a number that is used to heuristically parse bad HTML (it overrides the HTML SPEC a bit). The comment over Html_tag_cleanup_at_close() explains this. In a nutshell, a higher TagLevel allows the closing element's tag to close intermediate open tags, in the parsing stack, with lower TagLevel. Just use 2 as the value! :-) -- Cheers Jorge.-