If I have the following:
[%
a = 'this problem will cost me $50 million to fix';
b = 'WARNING: _err_';
b.replace('_err_', a);
%]
producing:
ERROR: this problem will cost me million to fix
What trick am I missing to fix without a manual escape of \$50 ?
I've tried things like:
b.replace('_err_', "\\Q$a\\E");
without luck. I guess I want a quotemeta vmethod like b.replace('_err_',
a.quotemeta) but is there a builtin way?
Cheers, Travis
This email, including attachments may be privileged, confidential and is
intended exclusively for the addressee. The views expressed may not be official
policy, but the personal views of the originator. If you have received this
email in error please notify the sender and delete it from your system. Emails
are not secure and may contain viruses. No liability can be accepted for
viruses that might be transferred by this email or any attachment.
_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates