W3C home > Mailing lists > Public > www-validator@w3.org > June 1999

Re: Parser Error?

From: Lloyd Wood <L.Wood@surrey.ac.uk>
Date: Mon, 14 Jun 1999 21:24:10 +0100 (BST)
To: Bjoern Hoehrmann <hoermi@arcormail.de>
cc: www-validator <www-validator@w3.org>
Message-ID: <Pine.SOL.4.02.9906142122491.14483-100000@petra.ee.surrey.ac.uk>
On Mon, 14 Jun 1999, Bjoern Hoehrmann wrote:

> | > So, for example, an &amp; _denotes_ the & character. When you
> | > have HREF="http://host.dom/foo.pl?a=1&amp;b=2", then the URL
> | > itself is http://host.dom/foo?a=1&b=2 but it must be written
> | > slightly differently in HTML. An HTML parser or a validator
> | > still does not parse the URL according to any specific syntax.
> | > It does the same basic thing with &stuff as it does elsewhere.
> |
> | In theory. Practice can be a different thing.
> |
> | http://www.mg.co.za/mg/m&e/archive.htm
> |
> | Okay, yes, that's an ampersand in the URL and directory name, and
> | they're running Apache 1.3.4 (unix).
> 
> This is an ampersand in an url not in a href attribute, not in html et al.
> 
> | What I'd dearly like to know is why:
> |
> | http://www.mg.co.za/mg/m&amp;e/archive.htm
> |
> | doesn't work. Yes, it's probably due to Netscape 4.5 not parsing &amp;
> | correctly...
> 
> As a url it does not work, but in an href attribut it works in most Browser
> (except Amaya e.g.).
> 
> In html the ampersand must be encoded, not in an Url. In an Url you should
> better use %xx-encoding.

http://www.mg.co.za/mg/m%26e/archive.htm

works.

is http://host.dom/foo?a=1%26b=2

doesn't. Pick your cases carefully.

L.

<L.Wood@surrey.ac.uk>PGP<http://www.ee.surrey.ac.uk/Personal/L.Wood/>
Received on Monday, 14 June 1999 16:24:40 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:13:52 GMT