[ZPT] preventing escaping of less-than and greater-thans in tal:replace

Don Morrison donmorrison at gmail.com
Mon Aug 14 13:38:54 EDT 2006

On 8/14/06, Don Morrison <donmorrison at gmail.com> wrote:
> > Eek string replacements are so much uglier than Python string format!

How does Python string format help me?  If I return a string from
Python the less-thans and greater-thans still get html escaped:

      <span tal:replace="python:'<'" />
      <span tal:define="global r record/name; id record/task_id;"
            tal:replace="string:option label='${r}' value='${id}'" />
      <span tal:replace="python:'>'" />
      <span tal:replace="string:${r}" />
      <span tal:replace="python:'<'" />
      <span tal:replace="string:/option" />
      <span tal:replace="python:'>'" />

More information about the ZPT mailing list