Hi Sam and all,

I've patched Template.pm version 2.6 so that it can now escape Javascript strings too. You can do that by passing the option ESCAPE=JS into a TMPL_VAR.

ESCAPE=HMTL and ESCAPE=URI are already supported, but I often have to display Javascript alerts and create dynamic DHTML/Javascript menus from data generated by a perl script. I feel that the ESCAPE=JS option is the only feature lacking from HTML::Template. With this option, HTML::Template is capable of escaping the 3 most common string formats in web applications: URLs, HTML, and Javascript.

For those interested in how this works:
you can test this feature here:
http://www.varuvo.nl/cgi-bin/htmltemplatejs.cgi
and you can download the 'unofficial' patched Template.pm v2.6 here:
http://www.skybound.nl/cgi-bin/download.cgi/HTML-Template-2.6_js.tar.gz

So my proposal is: please include this option in the next official version.

-Craig Manley

_________________________________________________________________
Get faster connections�-- switch to�MSN Internet Access! http://resourcecenter.msn.com/access/plans/default.asp



-------------------------------------------------------
This sf.net email is sponsored by: See the NEW Palm Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
_______________________________________________
Html-template-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/html-template-users

Reply via email to