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

Re: Bug: missing quotes cause segmentation fault

From: Dave Raggett <dsr@w3.org>
Date: Fri, 1 Sep 2000 17:00:50 +0100 (GMT Daylight Time)
To: Achim Schaefer <Achim.Schaefer@neuroinformatik.ruhr-uni-bochum.de>
cc: Terry Teague <teague@mailandnews.com>, html-tidy@w3.org
Message-ID: <Pine.WNT.4.10.10009011649170.-405663@hazel.hpl.hp.com>
On Fri, 25 Aug 2000, Achim Schaefer wrote:

> The proposed solution (see below) indeed fixes the problem for
> the code <A HREF=mailto:"user@host"> blah </a> and produces the
> desired output.
> 
> However, it does not change tidy's behaviour for code like <a
> href="test.html>link</a> <a href="test.html">link</a> This still
> leads to a segmentation fault (on SunOS/Solaris or a null
> pointer on other systems). This seems to be a different bug,
> though it looks very similar. Maybe someone can find a similar
> solution.

My fix avoids this problem, and produces the following output
for your example:

line 4 column 1 - Warning: <a> attribute with missing trailing
quote mark
...
<a href="test.html&gt;link&lt;/a&gt; &lt;a href=">link</a>
...

It would be better to make a retroactive guess that the first >
in the attribute is the end of the tag, and to push back the
rest of the text. I will need to spend more time to understand
how to do that.

Regards,

-- 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 12:01:20 GMT

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