Re: Validation difficulties

Liam Quinn (liam@htmlhelp.com)
Sat, 21 Feb 1998 19:10:53 -0500


Message-Id: <3.0.5.32.19980221191053.00a21ca0@undergrad.math.uwaterloo.ca>
Date: Sat, 21 Feb 1998 19:10:53 -0500
To: "Rob" <wlkngowl@unix.asb.com>, www-html@w3.org
From: Liam Quinn <liam@htmlhelp.com>
In-Reply-To: <199802212235.RAA29866@unix.asb.com>
Subject: Re: Validation difficulties

At 05:26 PM 21/02/98 -0500, 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?

Use "&amp;" in place of "&".

>Or should I just ignore it.

I wouldn't.  If "&arg2" is something like "&section", you'll cause Netscape
3.x to get the URL wrong since it will interpret "&sect" as the section
sign.  So that you don't have to think, it's safer to always use "&amp;".

There's a widespread myth that browsers don't correctly interpret entities
in HREFs.  I've tested numerous browsers, and the only browser to fail on
this was Amaya 1.1c Beta.  Passing the test were Netscape 1.0N, Netscape
1.22, Netscape 2.02, Netscape 3.04, Netscape 4.04, MSIE 4.0, Opera 3.0b9b,
HotJava 1.1, NCSA Mosaic 3.0, Lynx 2.7, UdiWWW 1.2, and AOLpress 1.2.3.
Given the danger posed by Netscape 3.x's guessing, I think it's worth using
valid HTML over invalid HTML in this case.

--
Liam Quinn
Web Design Group            Enhanced Designs, Web Site Development
http://www.htmlhelp.com/    http://enhanced-designs.com/