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>
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">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Test Validator</title>
<a href="javascript:myFunc('fred&barney=flintstones');">Test</a>
Thanks for the good work!


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 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:59:01 UTC