Re: Flagging & in URL in HTML 4.01 transitional type.

I recently had to adress this issue in trying to make a bunch of ad banner
calls validate, and I think there's a better way of escaping the ampersand
character.

While the use of & for escaping (and  ) it theoretically works, I
have found that not all browsers correctly handle such URLs when pasted into
the address field.

What I have found seems to work reliably (though through admittedly limited
testing) is the first method of escaping characters in URLs that I was
taught years ago--the %hex encoding. This is in the HTML 4.01 spec at
http://www.w3.org/TR/html4/appendix/notes.html#h-B.2.

So now I use %26 instead to insert an ampersand in a URL. This seems to work
reliably with the server-side scripts and in the URL address box of all
browsers.

I have seen some scripts that support the use of the question mark as the
separator, but the HTML 4.01 spec actually suggests the use of the
semicolon:

http://www.w3.org/TR/html4/appendix/notes.html#h-B.2.2

----- Original Message -----
From: "Peter Foti (PeterF)" <PeterF@SystolicNetworks.com>
To: <www-validator@w3.org>
Sent: Friday, June 08, 2001 11:13 AM
Subject: FW: Flagging & in URL in HTML 4.01 transitional type.

> Therefore, to display an &, we escape it with &amp;

Received on Friday, 8 June 2001 15:36:42 UTC