Copied to clipboard

Flag this post as spam?

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


  • Deepak 16 posts 36 karma points
    Nov 13, 2019 @ 09:42
    Deepak
    0

    Rich text editor add CDATA when adding javascript

    I am using umbraco version 4.9.0 and trying to add video javascript code and when it saves it will add CDATA tag in HTML source. It is adding this HTML source multiple times so video doesn't show in frontend.

    We are adding below script in RTE :

    <script type="text/javascript" src="/test.js"></script>
    <script type="text/javascript">
    KV.widget({
    "guid": "FrIjfhvo316",
    "type": "featured",
    "hideEmbedButton": true,
    "hideDownloadButton": true,
    "width": 550
    });
    </script>
    

    After saving this content RTE each time CDATA will be appended, so it will look like as below :

    <script type="text/javascript" src="/test.js"></script>
    <script type="text/javascript">// <![CDATA[
    CDATAOPENTAG-->
    CDATAOPENTAG-->
    CDATAOPENTAG-->
    
    KV.widget({
    "guid": "FrIjfhvo316",
    "type": "featured",
    "hideEmbedButton": true,
    "hideDownloadButton": true,
    "width": 550
    });
    // <!--CDATACLOSETAG
    // <!--CDATACLOSETAG
    // <!--CDATACLOSETAG
    // <!--CDATACLOSETAG
    // ]]></script>
    

    Please advise

Please Sign in or register to post replies

Write your reply to:

Draft