Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Stephen Balmer 18 posts 38 karma points
    Apr 05, 2017 @ 15:52
    Stephen Balmer
    0

    Hi,

    I'm using a textarea field to allow the client to paste javascript into a page.

    This works for most code but have a case that is failing.

    The code is

    <script>/*<![CDATA[*/(function(w,a,b,d,s)
    

    ++++Code removed as senstive++++ (window,'ActOn','Beacon',document,'script');ActOn.Beacon.track();/*]]>< / s c r i p t >

    but when I try and retrieve the string using "GetPropertyValue

    Please note, I've tried shortening the code in case of it being too long but it still strips the end data.

    Any thoughts on how to fix it or is this a bug in Umbraco?

    thanks, Steve.

  • Nicholas Westby 2054 posts 7100 karma points c-trib
    Apr 05, 2017 @ 16:14
    Nicholas Westby
    0

    I think Umbraco has problems with CDATA in text fields: http://issues.umbraco.org/issue/U4-6091

    I believe the inclusion of CDATA in JavaScript is a trick to get search engines to ignore the JavaScript. Can you simply remove the CDATA portion?

Please Sign in or register to post replies

Write your reply to:

Draft