Re: Tidy bug

Klaus Johannes Rusch <[email protected]> Wed, 21 Oct 2009 14:29:00 +0200
Newsgroups gmane.comp.web.html-tidy.devel
Organization atmedia.net
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--===============3833751849769320329==
Content-Type: multipart/alternative;
	boundary="------------070803090802080408080506"

This is a multi-part message in MIME format.
--------------070803090802080408080506
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Ben McCann wrote:
> Hi Klaus,
> I see that you marked the issue I reported as rejected on SourceForge 
> <https://sourceforge.net/tracker/?func=detail&aid=2855621&group_id=27659&atid=390963>.  
> Can we reopen it to reflect the conversation on this email thread?  
> I'd like it if we could work on implementing your suggestion: "One 
> thing I can think of that would help with this example is discarding 
> elements for which only an end tag is found, rather than generating a 
> corresponding start tag."
Ben,

the bug report is open and I have a possible fix, I can send you the win 
binary or you can try the modification below yourself if you want to 
experiment with the patched version on another platform.

Charlie,

it's been a while since I touched the tidy source code (looked pretty 
unfamiliar :-)), the fix appears to resolve the specific issue and not 
cause harm with a number of table related test cases I tried, would 
appreciate if you could look over this though and let me know if you agree:

RCS file: /cvsroot/tidy/tidy/src/parser.c,v
retrieving revision 1.187
diff -r1.187 parser.c
3471,3472c3471,3475
<                 TY_(UngetToken)( doc );
<                 node = TY_(InferredTag)(doc, TidyTag_TABLE);
---
 >                 /* http://tidy.sf.net/issue/2855621 */
 >                 if (node->type != EndTag) {
 >                     TY_(UngetToken)( doc );
 >                     node = TY_(InferredTag)(doc, TidyTag_TABLE);
 >                 }

-- 
Klaus Johannes Rusch
[email protected]
http://www.atmedia.net/KlausRusch/


--------------070803090802080408080506
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Ben McCann wrote:
<blockquote
 cite="mid:[email protected]"
 type="cite">Hi Klaus,<br>
I see that you <a moz-do-not-send="true"
 href="https://sourceforge.net/tracker/?func=detail&amp;aid=2855621&amp;group_id=27659&amp;atid=390963">marked
the issue I reported as rejected on SourceForge</a>.&nbsp; Can we reopen it
to reflect the conversation on this email thread?&nbsp; I'd like it if we
could work on implementing your suggestion: "One thing I can think of
that would help with this example is
discarding elements for which only an end tag is found, rather than
generating a corresponding start tag."<br>
</blockquote>
Ben,<br>
<br>
the bug report is open and I have a possible fix, I can send you the
win binary or you can try the modification below yourself if you want
to experiment with the patched version on another platform.<br>
<br>
Charlie,<br>
<br>
it's been a while since I touched the tidy source code (looked pretty
unfamiliar :-)), the fix appears to resolve the specific issue and not
cause harm with a number of table related test cases I tried, would
appreciate if you could look over this though and let me know if you
agree:<br>
<br>
RCS file: /cvsroot/tidy/tidy/src/parser.c,v<br>
retrieving revision 1.187<br>
diff -r1.187 parser.c<br>
3471,3472c3471,3475<br>
&lt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TY_(UngetToken)( doc );<br>
&lt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; node = TY_(InferredTag)(doc, TidyTag_TABLE);<br>
---<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* <a class="moz-txt-link-freetext" href="http://tidy.sf.net/issue/2855621">http://tidy.sf.net/issue/2855621</a> */<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (node-&gt;type != EndTag) {<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TY_(UngetToken)( doc );<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; node = TY_(InferredTag)(doc, TidyTag_TABLE);<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
<br>
<pre class="moz-signature" cols="72">-- 
Klaus Johannes Rusch
<a class="moz-txt-link-abbreviated" href="mailto:[email protected]">[email protected]</a>
<a class="moz-txt-link-freetext" href="http://www.atmedia.net/KlausRusch/">http://www.atmedia.net/KlausRusch/</a></pre>
</body>
</html>

--------------070803090802080408080506--


--===============3833751849769320329==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
--===============3833751849769320329==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Tidy-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tidy-develop

--===============3833751849769320329==--