Re: Validation difficulties

Tim Bagot (tim@heaven.on.earth.li)
Sat, 21 Feb 1998 17:51:41 -0500 (EST)


Date: Sat, 21 Feb 1998 17:51:41 -0500 (EST)
From: Tim Bagot <tim@heaven.on.earth.li>
To: HTML mailing list <www-html@w3.org>
In-Reply-To: <199802212235.RAA29866@unix.asb.com>
Message-ID: <Pine.LNX.3.96.980221223942.25714A-100000@heaven.on.earth.li>
Subject: Re: Validation difficulties



On Sat, 21 Feb 1998, Rob wrote:

> I've got a dilemma with the following
> 
>   <A HREF="page.cgi?arg1=val1&arg2=val2">link</A>
> 
> NSGMLS sys (rightly I assume) that &arg2 is not a valid entity and 
> returns an error.
> 
> So how can one get around this problem? Or should I just ignore it.
> 
> It's not appropriate to substitute '%26' for '&' in URLs in many cases, 
> since CGI scripts will often break the arguments by ampersands and then 
> decode (in part because an argument might contain an amersand!).

You can use &amp; (or &#38;).
 
> Something be changed in the DTD to allow any character in a URL.

It isn't simply a matter of changing the DTD. URLs are defined in an RFC
(1738 IIRC). There is a discussion of the use of non-ASCII characters in
URIs in the HTML 4.0 specification:-

http://www.w3.org/TR/REC-html40/appendix/notes.html#non-ascii-chars


Tim Bagot