4 Replies Latest reply on Jun 7, 2016 1:18 AM by ParitMittal

    HTML Offer escaping Javascript

    gabe@jive Level 1

      I'm trying to set up a new Experience in Target Premium that uses an HTML offer. 

      However, the script tag and javascript is being escaped. How can I prevent this? I have read in multiple places that it is possible to use javascript inside an HTML offer. 

      Here's the code I am inserting into the html offer:

      <script type="text/javascript"> var jvUser = "returning"; </script>

      Here's the code that is rendering on our page:

      var mboxCurrent=mboxFactories.get('default').get('target-global-mbox',0);mboxCurrent.setEventTime('include.start');document.write('<div style="visibility: hidden; display: none" id="mboxImported-default-target-global-mbox-0">');document.write('<!-- Offer Id: 100474  --><script type=\"text\/javascript\">\nvar jvUser = \'returning\';\n<\/script>');document.write('<!-- Offer Id: 9024  --><script type=\"text\/javascript\">window.ttMETA=(typeof(window.ttMETA)!=\'undefined\')?window.ttMETA:[];window.ttMETA.push({\'mbox\':\'target-global-mbox\',\'campaign\':\'Gabe\'s Test Experience\',\'experience\':\'Experience B\',\'offer\':\'Set Returning User Var1438712143868-1438712144015\'});window.ttMBX=function(x){var mbxList=[];for(i=0;i<ttMETA.length;i++){if(ttMETA[i].mbox==x.getName()){mbxList.push(ttMETA[i])}}return mbxList[x.getId()]}<\/script>');document.write('</div>');mboxCurrent.setEventTime('include.end');mboxFactories.get('default').get('target-global-mbox',0).loaded();
      • 0. Re: HTML Offer escaping Javascript
        popescu_ana3 Level 1

        Shekhar_Dhiman wrote...

        Hi There,

        Thanks for reaching out to Adobe Community.

        If you are using the Visual Experience Composer then please follow the steps in the below troubleshooting article and see if it helps:

        https://marketing.adobe.com/resources/help/en_US/target/target/r_troubleshoot_composer.html

        If you are still experiencing the issue then kindly update.

        Thanks!

         

        thanks for answer