Re: Tidy bug

Ben McCann <[email protected]> Thu, 19 Nov 2009 14:50:32 -0800
Newsgroups gmane.comp.web.html-tidy.devel
Message-ID <[email protected]>
--===============5968767028872667887==
Content-Type: multipart/alternative; boundary=000e0cd1723ac3d0b70478c12fe6

--000e0cd1723ac3d0b70478c12fe6
Content-Type: text/plain; charset=ISO-8859-1

I filed a bug<https://sourceforge.net/tracker/?func=detail&aid=2900790&group_id=27659&atid=390963>with
the details of this problem.  Not sure if anyone has time to address
it, but it'd be great if so.  jtidy won't accept a patch until it's fixed
here and I'm not much of a C coder.

Thanks!
Ben


On Tue, Nov 10, 2009 at 1:13 PM, Ben McCann <[email protected]> wrote:

> I'd also vote for #2 given that I think there are big advantages to
> matching what the major browsers do.
>
>
> On Mon, Nov 9, 2009 at 6:58 AM, Ger Hobbelt <[email protected]> wrote:
>
>> On Sun, Nov 8, 2009 at 8:05 PM, Klaus Johannes Rusch
>> <[email protected]> wrote:
>> > For this specific example, moving the <tr> into the table (and the
>> tbody)
>> > would seem a better solution, not sure we can generalize this though.
>> The
>> > dangling tr could be handled in four ways:
>> >
>> [...]
>> > 2. Discard the tr element and keep the content (this is the behaviour of
>> IE7
>> > and Firefox 3, good for a browser, maybe good for tidy?)
>> > 3. Surround the tr element with a new table (would address the issue
>> below
>> > but we may end up with lots of tablen when there is a missing table
>> element
>> > and multiple trs)
>>
>> Preferably #2. Reason: when applying htmltidy to content which
>> contains such markup errors, it will thus perform a cleanup which will
>> change the 'look' of the output only negligibly (or not at all) when
>> both versions are viewed in browsers - and that's where most of us
>> eyeball HTML anyway.
>> If not #2, then #3, so that is stays apart from the other chunks of
>> content and is, as such, still somewhat identifiable as the part where
>> the original input contained a markup error.
>>
>> For trailing <tr> sections, i.e. <tr>s immediately following a
>> </table> I can see why one would want to merge it in with the table
>> above (#4); here it about leading <tr> before a <table> and that is a
>> markup error of same or higher severity IMHO and should be treated as
>> such, so #4 is lowest on the list of 'good' choices.
>>
>> Discarding content (#1) should be prevented when possible, so please
>> don't pick #1. (Putting at <table> around it is way more informative
>> and educational to the one who screwed up the markup like that, either
>> by hand or through generator code, than plonking content chunks to
>> /dev/null )
>>
>> --
>> Met vriendelijke groeten / Best regards,
>>
>> Ger Hobbelt
>>
>> --------------------------------------------------
>> web:    http://www.hobbelt.com/
>>        http://www.hebbut.net/
>> mail:   [email protected]
>> mobile: +31-6-11 120 978
>> --------------------------------------------------
>>
>>
>> ------------------------------------------------------------------------------
>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
>> 30-Day
>> trial. Simplify your report design, integration and deployment - and focus
>> on
>> what you do best, core application coding. Discover what's new with
>> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>> _______________________________________________
>> Tidy-develop mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/tidy-develop
>>
>
>

--000e0cd1723ac3d0b70478c12fe6
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

I <a href=3D"https://sourceforge.net/tracker/?func=3Ddetail&amp;aid=3D29007=
90&amp;group_id=3D27659&amp;atid=3D390963">filed a bug</a> with the details=
 of this problem. =A0Not sure if anyone has time to address it, but it&#39;=
d be great if so. =A0jtidy won&#39;t accept a patch until it&#39;s fixed he=
re and I&#39;m not much of a C coder.<div>
<br></div><div>Thanks!</div><div>Ben<br><div><br><br><div class=3D"gmail_qu=
ote">On Tue, Nov 10, 2009 at 1:13 PM, Ben McCann <span dir=3D"ltr">&lt;<a h=
ref=3D"mailto:[email protected]">[email protected]</a>&gt;</span> wrote:<br=
><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1=
px #ccc solid;padding-left:1ex;">
I&#39;d also vote for #2 given that I think there are big advantages to mat=
ching what the major browsers do.<div><div></div><div class=3D"h5"><div><br=
><div><br><div class=3D"gmail_quote">On Mon, Nov 9, 2009 at 6:58 AM, Ger Ho=
bbelt <span dir=3D"ltr">&lt;<a href=3D"mailto:[email protected]" target=3D"_b=
lank">[email protected]</a>&gt;</span> wrote:<br>

<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div>On Sun, Nov 8, 2009 at 8:05 PM, Klaus J=
ohannes Rusch<br>
&lt;<a href=3D"mailto:[email protected]" target=3D"_blank">KlausRusch@=
atmedia.net</a>&gt; wrote:<br>
&gt; For this specific example, moving the &lt;tr&gt; into the table (and t=
he tbody)<br>
&gt; would seem a better solution, not sure we can generalize this though.=
=A0 The<br>
&gt; dangling tr could be handled in four ways:<br>
&gt;<br>
</div>[...]<br>
<div>&gt; 2. Discard the tr element and keep the content (this is the behav=
iour of IE7<br>
&gt; and Firefox 3, good for a browser, maybe good for tidy?)<br>
&gt; 3. Surround the tr element with a new table (would address the issue b=
elow<br>
&gt; but we may end up with lots of tablen when there is a missing table el=
ement<br>
&gt; and multiple trs)<br>
<br>
</div>Preferably #2. Reason: when applying htmltidy to content which<br>
contains such markup errors, it will thus perform a cleanup which will<br>
change the &#39;look&#39; of the output only negligibly (or not at all) whe=
n<br>
both versions are viewed in browsers - and that&#39;s where most of us<br>
eyeball HTML anyway.<br>
If not #2, then #3, so that is stays apart from the other chunks of<br>
content and is, as such, still somewhat identifiable as the part where<br>
the original input contained a markup error.<br>
<br>
For trailing &lt;tr&gt; sections, i.e. &lt;tr&gt;s immediately following a<=
br>
&lt;/table&gt; I can see why one would want to merge it in with the table<b=
r>
above (#4); here it about leading &lt;tr&gt; before a &lt;table&gt; and tha=
t is a<br>
markup error of same or higher severity IMHO and should be treated as<br>
such, so #4 is lowest on the list of &#39;good&#39; choices.<br>
<br>
Discarding content (#1) should be prevented when possible, so please<br>
don&#39;t pick #1. (Putting at &lt;table&gt; around it is way more informat=
ive<br>
and educational to the one who screwed up the markup like that, either<br>
by hand or through generator code, than plonking content chunks to<br>
/dev/null )<br>
<br>
--<br>
Met vriendelijke groeten / Best regards,<br>
<br>
Ger Hobbelt<br>
<br>
--------------------------------------------------<br>
web: =A0 =A0<a href=3D"http://www.hobbelt.com/" target=3D"_blank">http://ww=
w.hobbelt.com/</a><br>
 =A0 =A0 =A0 =A0<a href=3D"http://www.hebbut.net/" target=3D"_blank">http:/=
/www.hebbut.net/</a><br>
mail: =A0 <a href=3D"mailto:[email protected]" target=3D"_blank">ger@hobbelt.=
com</a><br>
mobile: +31-6-11 120 978<br>
--------------------------------------------------<br>
<br>
---------------------------------------------------------------------------=
---<br>
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day=
<br>
trial. Simplify your report design, integration and deployment - and focus =
on<br>
what you do best, core application coding. Discover what&#39;s new with<br>
Crystal Reports now. =A0<a href=3D"http://p.sf.net/sfu/bobj-july" target=3D=
"_blank">http://p.sf.net/sfu/bobj-july</a><br>
<div><div></div><div>_______________________________________________<br>
Tidy-develop mailing list<br>
<a href=3D"mailto:[email protected]" target=3D"_blank">Tid=
[email protected]</a><br>
<a href=3D"https://lists.sourceforge.net/lists/listinfo/tidy-develop" targe=
t=3D"_blank">https://lists.sourceforge.net/lists/listinfo/tidy-develop</a><=
br>
</div></div></blockquote></div><br></div></div>
</div></div></blockquote></div><br></div></div>

--000e0cd1723ac3d0b70478c12fe6--


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

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
--===============5968767028872667887==
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

--===============5968767028872667887==--