escape nested content in macro?

EC <[email protected]>
Newsgroups gmane.comp.web.freemarker.user
Message-ID <[email protected]>
Hi,
I have a macro that needs to escape as javascript its nested content.

Calling:
<@my_macro>
This "text"
Needs to be 'escaped' for JS
</@my_macro>

I tried things such as:
<#macro my_macro>
var v = "<#escape x as x?js_string><#nested></#escape>";
// do something with v
</#macro>

But I cannot get anything to work. How do I do something like that without
defining the text as a variable using assign?

Thanks

------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev

_______________________________________________
FreeMarker-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freemarker-user
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.