Javascript double ampersand (&&) problem
-
Hi,
I have just added some javascript to the wordpress sites I have set up however the && gets converted into & # 0 3 8 ; s and therefore doesn’t work.
Using the html editor only (disabled Visual incase it was causing the problem), a page looks like …
SOME HTML
<script type=”text/javascript”>// <![CDATA[
//<![CDATA[
SOME CODE
if ((a) && (b))
{
SOME CODE;
}
SOME CODE
//]]>
// ]]></script>
SOME HTMLI know the rest works, because if I replace if ((a) && (b)) with if (a) { if (b) etc then the page works as I expect. How can I stop the && getting replaced with & # 0 3 8 ; & # 0 3 8 ;? I know I could recode every page, but it seems a little daft that wordpress is changing my code without my wish. What else is it doing that I haven’t noticed!
Thanks
- The topic ‘Javascript double ampersand (&&) problem’ is closed to new replies.