Drupal incorrectly escapes tags in javascript
- by sergdev
I installed drupal-6.16.
I applied the patch from the post http://drupal.org/node/222926#comment-930745.
It works correctly in simple cases.
But following code of counter is handled incorrectly and counter is now displayed on the page after drupal.
Drupal modifies the string
"alt='1Gb.ua counter' /><\/a>")</a></script>
to
"alt='1Gb.ua counter' /><\/a>")</a></script>
The full code of counter follows:
<br><br>
Text
<br><br>
<!-- counter.1Gb.ua -->
<script language="javascript" type="text/javascript">
cgb_js="1.0"; cgb_r=""+Math.random()+"&r="+
escape(document.referrer)+"&pg="+
escape(window.location.href);
document.cookie="rqbct=1; path=/"; cgb_r+="&c="+
(document.cookie?"Y":"N");
</script><script language="javascript1.1" type="text/javascript">
cgb_js="1.1";cgb_r+="&j="+
(navigator.javaEnabled()?"Y":"N")</script>
<script language="javascript1.2" type="text/javascript">
cgb_js="1.2"; cgb_r+="&wh="+screen.width+
'x'+screen.height+"&px="+
(((navigator.appName.substring(0,3)=="Mic"))?
screen.colorDepth:screen.pixelDepth)</script>
<script language="javascript1.3" type="text/javascript">
cgb_js="1.3"</script>
<script language="javascript"
type="text/javascript">cgb_r+="&js="+cgb_js;
document.write("<a href='http://www.1Gb.ua?cnt=1416'>"+
"<img src='http://counter.1Gb.ua/cnt.aspx?"+
"u=1416&"+cgb_r+
"&' border=0 width=88 height=31 "+
"alt='1Gb.ua counter'><\/a>")</script>
<noscript><a href='http://www.1Gb.ua?cnt=1416'>
<img src="http://counter.1Gb.ua/cnt.aspx?u=1416"
border=0 width="88" height="31" alt="1Gb.ua counter"></a>
</noscript>
<!-- /counter.1Gb.ua -->
Does anybody have this code working?
How can it be fixed?
Thanks a lot in advance!