Re: Bug: missing quotes cause segmentation fault

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 UTC