Re: Validator should ignore text inside <script> tags

You can also put the body of your script as cdata

example:
<script>
<![CDATA[
function matchwo(a,b)
{
if (a < b && a < 0) then
   {
   return 1
   }
else
   {
   return 0
   }
}
]]>
</script>


On 4/26/07, Michael Adams <linux_mike@paradise.net.nz> wrote:
>
> On Thu, 26 Apr 2007 20:40:21 +1000
> James Rhodes wrote:
>
> >
> > The validator is attempting to validate text inside the <script> tags,
> > which will obviously produce errors.
> >
>
> The best solution is to have your script in external files.
>
> Not much more can be explained based on the information you have
> supplied:
> DTD - HTML and XHTML are different
> script - javascript, css, vbscript, or tcl
>
> A pointer to the page you are trying to validate is also helpful (almost
> mandatory) if you are asking for assistance.
>
> --
> Michael
> Linux: The OS people choose without $200,000,000 of persuasion.
>
>

Received on Saturday, 28 April 2007 00:12:59 UTC