TYPOlight Open Source CMS > TYPOlight forum

Switch to german forum

Index > Templates and CSS > Custom HTML problem

ndore
User
Avatar
Hi, I'm trying to to a little footer module to put a code to track visitors on my site. The code is provided by Xiti look like this

iconCode:
<a href="http://www.xiti.com/xiti.asp?s=422113" title="WebAnalytics" target="_top">
<script type="text/javascript">
<!--
Xt_param = 's=422113&p=';
try {Xt_r = top.document.referrer;}
catch(e) {Xt_r = document.referrer; }
Xt_h = new Date();
Xt_i = '<img width="39" height="25" border="0" alt="" ';
Xt_i += 'src="http://logv10.xiti.com/hit.xiti?'+Xt_param;
Xt_i += '&hl='+Xt_h.getHours()+'x'+Xt_h.getMinutes()+'x'+Xt_h.getSeconds();
if(parseFloat(navigator.appVersion)>=4)
{Xt_s=screen;Xt_i+='&r='+Xt_s.width+'x'+Xt_s.height+'x'+Xt_s.pixelDepth+'x'+Xt_s.colorDepth;}
document.write(Xt_i+'&ref='+Xt_r.replace(/[<>"]/g, '').replace(/&/g, '$')+'" title="Internet Audience">');
//-->
</script>
<noscript>
Mesure d'audience ROI statistique webanalytics par <img width="39" height="25" src="http://logv10.xiti.com/hit.xiti?s=422113&p=" alt="WebAnalytics" />
</noscript></a>

When I past the code in the Custom HTML and then click save I get this

iconCode:
<a href="http://www.xiti.com/xiti.asp?s=422113" title="WebAnalytics" target="_top">
<script type="text/javascript">
<!--
Xt_param = 's=422113&p=';
try {Xt_r = top.document.referrer;}
catch(e) {Xt_r = document.referrer; }
Xt_h = new Date();
Xt_i = '

it seems to me that <
iconCode:
Xt_i = '<img width="39"
is the trigger because if I move it around, the code stripping move with it. I checked the illegal html tag but img script and noscript are there. I checked online to know if this is a known issue but I didn't find anything related to this.

Thanks for your help
18/06/2009 19:48
ndore
User
Avatar
Oh I forgot to mention, I've tested the exact same code in the demo typolight with same results...

Thanks!
18/06/2009 19:49
ga.n
User
Avatar
Posts: 85
Italy
Hi ndore,

please check your Settings -> Allowed html tags; you should add the
iconhtml4strict:
tags to use them within a custom html module.
19/06/2009 06:42
ndore
User
Avatar
Thank for the answer, I already got that into place. I got close to the answer by playing with the code.

I found out that Typolight doesn`t like the "<img" left without ">". The code is stripped just where <img is supposed to be and the actual closing for that tag is only way lower in the code and I think that's why it causes a problem. I'll continue to play with it to see if I can get around that
19/06/2009 07:03
ndore
User
Avatar
Is it possible to just turn off that stripping thing?
Last edited by ndore, 19/06/2009 07:16
19/06/2009 07:06
ndore
User
Avatar
Got it,

I put an include where I can do whatever I want so there is no stripping... :)

iconCode:
<script type="text/javascript" src="xiti.js">
</script>
19/06/2009 07:40