Tidy 88

From Htmlpedia
Revision as of 00:09, 22 September 2007 by Instance (talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

Tidy: character ";" not allowed in attribute specification list

Possible Cause:

Unescaped JavaScript generates multiple validation errors, this is one of them.

Example:

Bad


<script language="javascript">
for(x=0;x<item.length;x++){
    //
}
</script>

Good


<script language="javascript">
//<![CDATA[
for(x=0;x<item.length;x++){
    //
}
//]]>
</script>

Solution:

Wrap the JavaScript code in CDATA; Hide the CDATA from JavaScript with a // comment.

References: