[htmltmpl] Escaping unicode
Brought to you by:
samtregar
From: Tobias N. <tn...@mo...> - 2009-11-13 13:27:01
|
Hi! I'm using HTML::Template to generate RTF-documents which works pretty good with plain ASCII. But since with RTF Unicode characters have to be escaped (like \u0123, Unicode::Escape exists for this), I have to either escape it before I feed it to HTML::Template or I have to convince H::T to escape it on-the-fly. The filter option sounds promising, but it touches the template before the tags are parsed. For the data to be escaped before feeding it to H::T, I'd have to add a lot of code, therefore I'd like to avoid this approach. Is there any way I can tell H::T to escape Unicode data I feed to it with param()? If not, then the next best thing would be to create a patched version of H::T for my purposes with a method like param_escape() or sth like that, right? Best regards! Tobias |