Tags:
create new tag
, view all tags

Question

I'm using FlexibleSkin on a publicly-accessible, read-only TWiki installation.

I would like to incorporate a web counter (specifically, SpyLog). This counter is supposed to go on top of each page, as Javascript code.

However, when I paste it into FlexibleSkinTopBar, the < signs become &gt and < etc. The HTML gets processed somehow (evidently). I want to have it poured really raw.

I tried editing the FlexibleSkin TMPL file, but got the same result.

Any advice for me?

More specifically, THIS is the code I'm trying to incorporate:

<!-- SpyLOG f:0211 -->
<div STYLE="behavior:url(#default#clientCaps)" ID="MC"></div>
<script language="javascript"><!--
Mu="u4599.33.spylog.com";Md=document;Mnv=navigator;Mp=1;
Mn=(Mnv.appName.substring(0,2)=="Mi")?0:1;Mrn=Math.random();
Mt=(new Date()).getTimezoneOffset();
Mz="p="+Mp+"&rn="+Mrn+"&t="+Mt;
Md.cookie="b=b";Mc=0;if(Md.cookie)Mc=1;Mz+='&c='+Mc;
Mz+='&title='+escape(Md.title)+'&partname='+escape('others');
if(self!=top){Mfr=1;} else{Mfr=0;}Msl="1.0";
if(!Mn&&Mnv.userAgent.indexOf("Opera")<0&&Mnv.userAgent.indexOf("Mac")<0&&
(Mnv.appVersion.indexOf("MSIE 5")>-1||Mnv.appVersion.indexOf("MSIE 6")>-1))
{Mid="{D27CDB6E-AE6D-11CF-96B8-444553540000}";Midn="ComponentID";
Mfl=MC.getComponentVersion(Mid,Midn);Mct=MC.connectionType;Mz+='&fl='+Mfl+'&ct='+Mct;}
//--></script><script language="javascript1.1"><!--
Mpl="";Msl="1.1";Mj = (Mnv.javaEnabled()?"Y":"N");Mz+='&j='+Mj;
//--></script><script language="javascript1.2"><!-- 
Msl="1.2";Ms=screen;Mpx=(Mn==0)?Ms.colorDepth:Ms.pixelDepth;
Mz+="&wh="+Ms.width+'x'+Ms.height+"&px="+Mpx;
Mw=window;if(Mw.innerWidth){MwIW=Mw.innerWidth;MwIH=Mw.innerHeight;Mz+="&rwh="+MwIW+'x'+MwIH;} 
else if(Md.body.clientWidth){MwIW=Md.body.clientWidth;MwIH=Md.body.clientHeight;Mz+="&rwh="+MwIW+'x'+MwIH;}
//--></script><script language="javascript1.3"><!--
Msl="1.3";//--></script><script language="javascript"><!--
My="";
My+="<a href='http://"+Mu+"/cnt?cid=459933&f=3&p="+Mp+"&rn="+Mrn+"' target='_blank'>";
My+="<img src='http://"+Mu+"/cnt?cid=459933&"+Mz+"&r="+escape(Md.referrer)+"&pg="+escape(window.location.href)+"' border=0 width=1 height=1 alt='SpyLOG'>";
My+="</a>";Md.write(My);//--></script><noscript>
<a href="http://u4599.33.spylog.com/cnt?cid=459933&f=3&p=1" target="_blank">
<img src="http://u4599.33.spylog.com/cnt?cid=459933&p=1" alt='SpyLOG' border='0' width=1 height=1 >
</a></noscript>
<!-- SpyLOG -->

Environment

TWiki version: TWikiRelease02Sep2004
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: Linux
Web server: Apache
Perl version: Don't know...
Client OS: XP SP 2
Web Browser: FireFox
Categories: Javascript, Deployment

-- ErezZukerman - 13 Apr 2005

Answer

TWiki escapes < and > if they are not a pair on the same line. See answer in JavaScriptExecutionProblem.

-- PeterThoeny - 13 Apr 2005

 
Topic revision: r2 - 2005-04-13 - PeterThoeny
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.