Quantcast
Channel: Adobe Community : Popular Discussions - Contribute
Viewing all articles
Browse latest Browse all 1458

Problem with Contribute URL decoding a javascript

$
0
0

Hi,

 

On all pages of our website we have a Google Analytics script:

 

<script type="text/javascript">

     var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl" : "http://www");

     document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));

</script>

 

But every time someone makes a change to one of the pages with Contribute, the script is automatically altered to this:

 

 

<script type="text/javascript">

     var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl" : "http://www");

     document.write(unescape("<script src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'></script>"));

</script>

 

The difference is that Contribute has decided to automatically URL decode the first of the two closing </script> tags, which breaks the script; it's URL encoded for a reason: so that the browser doesn't end the script prematurely on parsing the first of the </script> tags. Is there some setting within Contribute that will allow us to stop this from happening? We just want Contribute to leave the Javascript alone.

 

Many thanks,

Mark


Viewing all articles
Browse latest Browse all 1458

Trending Articles