HTML Rendering clarification

Vote:
 

Hi there,

A client has added the following HTML to a usercontrol, which isn't being rendered as expected:

<script language="javascript" type="text/javascript"> 
 document.write('<s' + 'cript language="javascript" type="text/javascript" src="' + document.location.protocol + '//track.searchignite.com/si/CM/Tracking/ClickTracking.aspx?siclientid=xxxxx&jscript=1"></s' + 'cript>'); 
</script>    

What's actually being rendered is:

<script language="javascript" type="text/javascript"> 
 document.write('<s' + 'cript language="javascript" type="text/javascript" src="' + document.location.protocol + '//track.searchignite.com/si/CM/Tracking/ClickTracking.aspx?siclientid=xxxxx&jscript=1"></s'>); 
</script>

Note that the closing script tag in the document.write has been modified.

I suspect that this is falling foul of some sort of HTML validation being performed by EPiServer and I've resolved the issue by modifying the provided tag to use unescape.

I would, however, like to figure out the root cause and just understand exactly what's going on... as I'm bound to encounter this again in the future.

Regards,

#49410
Mar 16, 2011 12:16
Vote:
 

Hi!

I found an internal bug which has been postponed to the next CMS version which had a notification about a possible work around:

A workaround to the actual issue reported is to rewrite the code from:

... + '</SCR' + 'IPT>' ...

to

... + '<' + '/SCRIPT>' ...

Regards
Linus Ekström
EPiServer Development Team

#49412
Mar 16, 2011 12:56
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.