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

Re: Bug report: LINK tag not well-formed in output

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Wed, 6 Sep 2000 21:06:23 +0200
Message-ID: <009701c01837$2f7bbc00$7eccb43e@de>
To: "Evan Lenz" <elenz@xyzfind.com>
Cc: <html-tidy@w3.org>
* "Evan Lenz" <elenz@xyzfind.com> wrote:
| In testing my servlet which uses Tidy before doing XSLT processing, I've
| been uploading copies of various HTML pages on the Internet.
|
| This code:
|
| <STYLE>
| <LINK REL="stylesheet"
| HREF="http://www.thestreet.com/tsc/common/stylesheets/global.css"
| TYPE="text/css">
| </STYLE>
|
| Resulted in (XHTML mode):
|

<style type="text/css">
| <LINK REL="stylesheet"
| HREF="http://www.thestreet.com/tsc/common/stylesheets/global.css"
| TYPE="text/css">
</style>

The input is valid, style data is CDATA. In XHTML it's PCDATA.

I think Tidy has to assume, that the input code is close to be perfect, so it
can do two things:

 * encode occurences of < and & into &lt; and &amp; or
 * wrap the style data into <![CDATA[]]>

Any other action (besides reporting an error) isn't appropriate in my opinion.
The input is valid HTML, so there aren't errors tidy has to correct. The thing
tidy does in your case is conversion between HTML and XHTML syntax rules, so
one of the above actions (the latter is recommended in XHTML/1.0) should take
place.

What you want and what you've meant with your code isn't the right thing to
do.

regards,
--
Björn Höhrmann ^ mailto:bjoern@hoehrmann.de ^ http://www.bjoernsworld.de
am Badedeich 7 ° Telefon: +49(0)4667/981ASK ° http://bjoern.hoehrmann.de
25899 Dagebüll # PGP Pub. KeyID: 0xA4357E78 # http://learn.to/quote +{i}
Received on Wednesday, 6 September 2000 15:19:20 GMT

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