fixing broken & rendering from javascript creating links within a page.

Dave Forrest's Avatar

Dave Forrest

26 Apr, 2016 04:24 PM

On http://help.hannonhill.com/discussions/how-do-i/478-prevent-ampersa... it suggested code like

function fixAmp(text) { return text.replace(/&/g, '&');}

in a .js file, but i found I could use an ugly hack within the document:

function fixAmp(text) { return text.replace(/amp;/g, '');}

this breaks the escaping roughly but then it the dangling ampersand gets re-escaped somehow.

  1. 1 Posted by Ryan Griffith on 05 May, 2016 07:51 PM

    Ryan Griffith's Avatar

    Hi Dave,

    To confirm, are you seeing code on your page being encoded by Cascade (e.g. JavaScript)? If so, you can also try surrounding the code with <![CDATA[#protect ... #protect]]> tags to bypass the content being encoded. More information can be found here.

    Please let me know if you have any questions.

    Thanks!

  2. Tim closed this discussion on 31 May, 2016 05:20 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

 

26 Aug, 2016 01:19 PM
25 Aug, 2016 03:02 PM
25 Aug, 2016 12:50 PM
24 Aug, 2016 08:43 PM
24 Aug, 2016 07:20 PM
21 Aug, 2016 01:20 PM