TALInterpreter uses str() when it shouldn't, leads to unicode error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zope 2 |
Fix Released
|
Medium
|
Unassigned |
Bug Description
When using an i18n:name directive on a tag that gets unicode content (with non-ascii chars) using tal:replace, the TAL machinery barfs because it tries to call str() on the content. Example:
> <span tal:replace=
The offending str() call seems to be in TAL/TALInterpre
> if not structure:
> value = cgi.escape(
Not entirely sure about my fix, but if I change this to the following it does work:
> if not structure:
> if type(value) not in [str, unicode]:
> value = str(value)
> value = cgi.escape(value)
Note that I don't have any PlacelessTransl
Hi, continues even with the problems in the newer versions?