Comment 0 for bug 143895

Revision history for this message
Sascha Welter (betabug) wrote :

Uploaded: default_replace_test.patch

In a tag that uses something like tal:replace="context/notexistant|default" the default keyword is treated like the "nothing" keyword, i.e. the tag in question is not in the resulting source.

**** My testcase (in a blank ZPT):

[<img src="http://127.0.0.1:8080/misc_/PageTemplates/zpt.gif"
tal:replace="structure here/notexists|default" />]

[<img src="http://127.0.0.1:8080/misc_/PageTemplates/zpt.gif"
tal:replace="structure default" />]

[<img src="http://127.0.0.1:8080/misc_/PageTemplates/zpt.gif"
tal:replace="default" />]

**** Expected behaviour:
In 2.9 these render to 3 little zpt.gif icons in []. Rendered source:

[<img src="http://127.0.0.1:8080/misc_/PageTemplates/zpt.gif" />]

[<img src="http://127.0.0.1:8080/misc_/PageTemplates/zpt.gif" />]

[<img src="http://127.0.0.1:8080/misc_/PageTemplates/zpt.gif" />]

**** What I got:
In 2.10.3 this renders to the following html source:

[]

[]

[]

Please see attached diff for a test to reproduce the matter.