W3C home > Mailing lists > Public > html-tidy@w3.org > July to September 2000

Re: Bug: Nested anchor elements allowed

From: Dave Raggett <dsr@w3.org>
Date: Fri, 1 Sep 2000 14:03:34 +0100 (GMT Daylight Time)
To: Randy Waki <rwaki@flipdog.com>
cc: html-tidy@w3.org
Message-ID: <Pine.WNT.4.10.10009011402000.-405663@hazel.hpl.hp.com>
On Wed, 23 Aug 2000, Randy Waki wrote:

> 4-Aug-2000 Tidy fails to tidy nested anchor elements.  This bug
> has existed ever since the 24-Nov-1999 version, but it did not
> exist in the 26-Jul-1999 version.  By a truly amazing
> coincidence (especially given how long this bug has existed),
> Bjoern Hoehrmann reported this same bug as I was preparing this
> message.
> The bug appears to be in parser.c's ParseInline() function which
> assumes that anchor elements are pushed on the istack.  That was
> once a valid test but not any longer.  I think the following
> change fixes it.  Note that a second bug must also be fixed in
> the immediately following if statement (it must check for </a>
> end tags) to prevent an infinite loop, something that the first
> bug had prevented from happening.

Thanks for the patch, I tested it and it appears to work fine.
I also dropped the PopInline since this is now longer needed
now that Tidy doesn't push anchors onto the inline stack.


-- Dave Raggett <dsr@w3.org> http://www.w3.org/People/Raggett
tel/fax: +44 122 578 3011 (or 2521) +44 778 532 0444 (mobile)
World Wide Web Consortium (on assignment from HP Labs)
Received on Friday, 1 September 2000 09:03:58 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:38:48 UTC