AI OnAI Off
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
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,