Posted on Leave a comment

Validating script elements in XHTML

I’ve found that multiple errors will come from within any [script] tags that I have. To solve this, use
CDATA as so:

< ! [ CDATA [

** Please note that you should not have your
characters spaced as I've done above, this is
because my blogger editor doesn't
like angle brackets!!

function thisDoesntMatter(a,b)
if (a < b && a < 0) then { return 1 } } ]]>

Above is the closing tag for your CDATA


On another note, if you are having issues with chacters within links being validated, make sure your & signs are using the ASCII code and not just the & symbol.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.