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

Re: TIDY doesn't handle asp scripts correctly...instead it misinterprets them

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Tue, 22 Aug 2000 19:02:17 +0200
Message-ID: <005501c00c5a$c87fc2e0$d92190d4@de>
To: "Andreas Eibach" <a.eibach@gmx.net>
Cc: <html-tidy@w3.org>
* "Andreas Eibach" <a.eibach@gmx.net> wrote:
| > As it turns out, this came up a few weeks ago.  Tidy is actually doing
| > the right thing.  The &'s must be escaped as &amp; according to the HTML
| > spec.  Check the thread in the mailing list archives at
|
| As it turns out, this was *not* what I meant.
|
| I think it hasn't anything to do with my problem.
|
| Mine is that a site URL inside the HTML
|  <a href="http://www.bogus.com/script.asp?p1=1&p2=2&p3=3>
|
| results in a warning message
|
| line 1 column xx - Warning: unescaped or unknown entity "&p2"
| line 2 column yy - Warning: unescaped or unknown entity "&p3"
|
| The thing the thread far below is talking about is a different thing.

Your problem is, that you are writing sloppy HTML code. There are no entitys
'p2' and 'p3'. If you do not even whant 'p2' and 'p3' to be entitys, you have
to encode your ampersand as an entity:

<a href="http://www.bogus.com/script.asp?p1=1&amp;p2=2&amp;p3=3>

This is correct HTML and good browsers will convert '&amp;' back to '&' before
they request the referenced URL.

See

http://ppewww.ph.gla.ac.uk/~flavell/www/formgetbyurl.html
http://www.htmlhelp.com/tools/validator/reasons.html
http://www.htmlhelp.com/tools/validator/problems.html

for a broader discussion and

http://validator.w3.org/

to see, that you actually write sloppy HTML code.

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 KeyID:      0xA4357E78 · http://learn.to/quote +{i}
Received on Tuesday, 22 August 2000 13:03:44 GMT

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