JavaScript Error in Template
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:
- mobile-redirect.txt 1.46 KB
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
1 Posted by Kris on Mar 17, 2011 @ 06:05 PM
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:
Hope that helps,
Kris
2 Posted by lmwatson on Mar 17, 2011 @ 06:09 PM
We will give it a try
Thanks,
Linda
Tim closed this discussion on Jun 21, 2011 @ 03:44 PM.