W3C home > Mailing lists > Public > www-validator@w3.org > July 2001

Re: DTD 4.01 for ignoring & in CGI URL

From: Nick Kew <nick@webthing.com>
Date: Mon, 23 Jul 2001 21:46:08 +0100 (BST)
To: www-validator@w3.org
Message-ID: <Pine.BSF.4.21.0107232138270.604-100000@fenris.webthing.com>
On Mon, 23 Jul 2001, Terje Bless wrote:

> Nestor: I think I can throw together a patch to "check" for you that will
> ignore messages specifically for amperstands in URIs.

OTTOMH (meaning don't use without testing ;-)

s/(<a.+?>)/escape_amp($1)/geis ;

with

sub escape_amp { s/&/&amp;/g ; return $_ ; }


The old WebTechs validator just put the whole document through
s/&/&amp;/g ;

which of course has the desired effect, but also the side-effect of
failing to catch other non-entities.

-- 
Nick Kew

Site Valet - the essential service for anyone with a website.
<URL:http://valet.webthing.com/>
Received on Monday, 23 July 2001 16:46:27 GMT

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