Forum Discussion
Hi Mackinaw,
Freemarker offers a few built-ins for encoding, depending on exactly what you want to accomplish. Perhaps one of these will work for you?
http://freemarker.sourceforge.net/docs/ref_builtins_string.html#ref_builtin_xml
http://freemarker.sourceforge.net/docs/ref_builtins_string.html#ref_builtin_url
There's also HTML and XHTML encoding, in case that's helpful:
http://freemarker.sourceforge.net/docs/ref_builtins_string.html#ref_builtin_html
http://freemarker.sourceforge.net/docs/ref_builtins_string.html#ref_builtin_xhtml
And if none of those will do exactly what you'd like, there's also a replace built-in:
http://freemarker.sourceforge.net/docs/ref_builtins_string.html#ref_builtin_replace
I hope this helps!
Thanks - I found some inconsistent on how/when the client application passes the value through v. parses it - i wound up just using CDATA instead.
Thanks,
Paul
Related Content
- 4 years ago
- 13 years agoInactive User
- 6 years ago