[PHPTAL] Generate string in Javascript with TAL
Michal Ludvig
michal at logix.cz
Mon Apr 16 05:02:06 CEST 2007
Hi all,
I need to generate a string into a simple JavaScript code.
The goal is like this:
<script language="javascript" type="text/javascript">
google_kw = "keyword1, keyword2";
</script>
My code is:
<script language="javascript" type="text/javascript">
google_kw = "<span tal:replace="structure page/meta_keywords" />";
</script>
Unfortunately the output of this code has the quotes (") replaced by
entities ("):
<script language="javascript" type="text/javascript">
google_kw = "keyword1, keyword2";
</script>
How can I get rid of this replacing? Or is there another way to achieve
my goal other than generating the whole JS code in PHP and outputting it
with tal:content?
Thanks
Michal
More information about the PHPTAL
mailing list