JavaScript Error in Template

lmwatson's Avatar

lmwatson

Mar 17, 2011 @ 05:02 PM

I am trying to insert the following JS in the head section of our template and this is the message I receive:

An error occurred during editing: The entity name must immediately follow the '&' in the entity reference.

I have tried attaching the JS through a format block and Xhtml block with the <!--#START-CODE code which affects other JS and CSS.
Any other ideas?

JS file attached also:

http://m.rollins.edu




  1. 1 Posted by Kris on Mar 17, 2011 @ 06:05 PM

    Kris's Avatar

    The problem is that your template must be valid XHTML and Cascade's parser sees that & as an entity reference. What you need to do is add CDATA tags inside your script tags but you can't just add regular CDATA tags either. Here is what I use:

    <script type="text/javascript">
        /*<![CDATA[*//*---->*/
    
        JS Code here
    
        /*--*//*]]>*/
    </script>
    

    Hope that helps,
    Kris

  2. 2 Posted by lmwatson on Mar 17, 2011 @ 06:09 PM

    lmwatson's Avatar

    We will give it a try

    Thanks,
    Linda

  3. Tim closed this discussion on Jun 21, 2011 @ 03:44 PM.

Discussions are closed to public comments.
If you need help with Cascade CMS please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac