W3C home > Mailing lists > Public > www-validator@w3.org > April 2005

RE: Ampersands in URLs

From: iNaNimAtE <iNaNimAtE@cfxnetworks.com>
Date: Sat, 23 Apr 2005 12:23:43 -0700
To: "'Martin Campos'" <vmartin.campos@gmail.com>
Cc: <www-validator@w3.org>
Message-ID: <auto-000000300007@cfxnetworks.com>

I actually fixed the problem by escaping the ampersand in JavaScript:

function info(type) {
	window.open("/?op=info" + unescape('%26') + "page=" + type);

However, if I were to write "info&page=" the validator would give the same
problem as if anyone were to write an ampersand in a URL (regardless of if
it is a link on a page or in JavaScript). The real thing here is that the
validator does not know the difference between parsing JavaScript and
HTML--the only workaround I see is (besides what I did) putting all of your
JavaScript in a separate .js file.

From: Martin Campos [mailto:vmartin.campos@gmail.com] 
Sent: Saturday, April 23, 2005 6:48
To: iNaNimAtE
Cc: www-validator@w3.org
Subject: Re: Ampersands in URLs

Can you send the URL page for the validator?

Received on Saturday, 23 April 2005 19:24:21 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:17:45 UTC