[geeklog-users] including javascript in blocks

geeklog-users-admin at lists.geeklog.net geeklog-users-admin at lists.geeklog.net
Mon Jun 16 11:33:24 EDT 2003


Thanks, but I've found another problem. Geeklog is stripping slashes 
from the javascript code in this section:

i=0; document.write("\<a href=\"");
while( t[i] ) document.write("\&\#"+t[i++]+";");
i++; document.write("\" title=\"");
while( t[i] ) document.write("\&\#"+t[i++]+";");
i++; document.write("\"\>");
while( t[i] ) document.write("\&\#"+t[i++]+";");
i++; document.write("\<\/a\>");

When viewing the source, after loading the javascript, all the 
backslashes which are escaping the special characters are being 
removed. How do I go about preventing that from happening?

Norm
On Monday, June 16, 2003, at 01:13  AM, 
geeklog-users-admin at lists.geeklog.net wrote:

> Norm wrote:
>
>> I just tried it in a normal block and got
>> nothing. I then viewed the html source and noted that <br> were put
>> after each line of the javascript...
>
> Since Geeklog doesn't know whether the block contains HTML or plain 
> text,
> it looks at the very first character of the block content. If it's a 
> '<',
> it assumes it's HTML and doesn't apply nl2br() to the block content.
>
> So if the <script> tag is the first thing in the block (no blank lines 
> or
> whitespace before that), there shouldn't be any <br> tags in the 
> source.
>
> bye, Dirk
>
>
> -- 
> http://www.haun-online.de/
> http://www.macosx-faq.de/
>
> _______________________________________________
> geeklog-users mailing list
> geeklog-users at lists.geeklog.net
> http://lists.geeklog.net/listinfo/geeklog-users
>
>
Norman Cohen
nacohen at mac.com

------------------
Confidentiality Note:  This message is intended for use only by the 
individual or entity to which it is addressed and may contain 
information that is privileged, confidential, and exempt from 
disclosure under applicable law.  If the reader of this message is not 
the intended recipient or the employee or agent responsible for 
delivering the message to the intended recipient, you are hereby 
notified that any dissemination, distribution or copying of this 
communication is strictly prohibited.  If you have received this 
communication in error,  please contact the sender immediately and 
destroy the material in its entirety, whether electronic or hard copy.  
Thank you.




More information about the geeklog-users mailing list