: Google Optimizer code, validation and cdata I ran my site through the W3C validator, and a bunch of errors were caused by the Google Website Optimizer javascript. It seems weird that would happen.
I ran my site through the W3C validator, and a bunch of errors were caused by the Google Website Optimizer javascript.
It seems weird that would happen. If I put CDATA around it, the error go away. I assume that the code will still work?
So, I'm wondering if there's ever a time it's bad to put CDATA around javascript?
and
Why would Google's javascript snippets not validate in the first place?
More posts by @Frith620
1 Comments
Sorted by latest first Latest Oldest Best
It probably has to do with the doctype. I suspect you're using XHTML. JavaScript Contains Characters Which Can Not Exist in XHTML. Raw < and & characters are not allowed except inside of CDATA Sections. See this page for more.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.