Re: Tidy bug

Ben McCann <[email protected]> Tue, 10 Nov 2009 13:13:14 -0800
Newsgroups gmane.comp.web.html-tidy.devel
Message-ID <[email protected]>
--===============8994088638413299367==
Content-Type: multipart/alternative; boundary=000e0cd211d4450b8204780ac7c3

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

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
>

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

I&#39;d also vote for #2 given that I think there are big advantages to mat=
ching what the major browsers do.<div><br><div><br><div class=3D"gmail_quot=
e">On Mon, Nov 9, 2009 at 6:58 AM, Ger Hobbelt <span dir=3D"ltr">&lt;<a hre=
f=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:1p=
x #ccc solid;padding-left:1ex;"><div class=3D"im">On Sun, Nov 8, 2009 at 8:=
05 PM, Klaus Johannes Rusch<br>
&lt;<a href=3D"mailto:[email protected]">[email protected]</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 class=3D"im">&gt; 2. Discard the tr element and keep the content (this=
 is the behaviour 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]">[email protected]</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 class=3D"h5">_________________________________________=
______<br>
Tidy-develop mailing list<br>
<a href=3D"mailto:[email protected]">[email protected]=
urceforge.net</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>

--000e0cd211d4450b8204780ac7c3--


--===============8994088638413299367==
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
--===============8994088638413299367==
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

--===============8994088638413299367==--