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

Received on Monday, 23 February 1998 03:45:40 UTC