W3C home > Mailing lists > Public > html-tidy@w3.org > April to June 2000

Loop in handling improper FRAMESET/FRAME tags

From: Anselm Baird-Smith <anselm@realnames.com>
Date: Mon, 8 May 2000 22:28:51 -0400 (EDT)
Message-ID: <B7233BD6980AD411875700508B5BD5D2DE17@elporto.centraal.com>
To: "'html-tidy@w3.org'" <html-tidy@w3.org>
Hi there,

The attached piece of html makes tidy30apr00 loop. The Java version does
loop as well, I fixed it by changing:

    org/w3c/tidy/ParserImpl.java{ParseHtml}::parse

so that right before it ungets the token (by calling 'lexer.ungetToken') it
runs the following check:

if ( frameset != null && node.type == node.EndTag && node.tag ==
TagTable.tagFrame )
	continue;

I am not sure if this is the proper fix, but it defintely broke the loop in
the java code.

Anselm.
----- sample html file -----
<HTML>
<HEAD><TITLE>Improper frameset</TITLE>
</HEAD> 

<FRAMESET BORDER=0 ROWS="100,*">

<FRAME SCROLLING=NO MARGINHEIGHT="0" SRC="whatever">
</FRAME>
<FRAME SCROLLING=auto MARGINHEIGHT="0" SRC="andwhatnot"></FR
AMESET>
</FRAME>
<NOFRAMES>
<P>No frames tag here !
</NOFRAMES>
</HTML>
----- end sample html file -----
Received on Monday, 8 May 2000 22:53:42 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:43 GMT