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

Javascript within href reported as error if contains & or =

From: Peter Jones <jonespm2@shaw.ca>
Date: Wed, 11 Apr 2007 08:33:39 -0700
To: www-validator@w3.org
Message-id: <000501c77c4e$c9663340$6401a8c0@pjp4>
Hi
 
The validator reports errors, like 'cannot generate system identifier for
general entity "barney"' and 'reference not terminated by REFC delimiter'
when code like the following is submitted.  Checking within the href
attribute should be turned off when it begins with 'javascript, unless you
really are going to check it as javascript.
 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Test Validator</title>
</head>
<body>
<a href="javascript:myFunc('fred&barney=flintstones');">Test</a>
</body>
</html>
 
Thanks for the good work!

Peter

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 269.0.0/754 - Release Date: 09/04/2007
10:59 PM
 
Received on Wednesday, 11 April 2007 22:02:10 GMT

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