[Petal] Problems with on-error?
Bruno Postle
bruno at mkdoc.com
Mon Dec 5 16:24:58 GMT 2005
On Wed 30-Nov-2005 at 12:59 +0000, Bruno Postle wrote:
>Yes, looks like there are two bugs here:
>
>* The TAL spec says that 'on-error' should be treated as a
> 'content' statement, but Petal replaces the entire tag.
>
>* The expression isn't being evaluated and is dumped as a simple
> string.
>
>http://www.zope.org/Wikis/DevSite/Projects/ZPT/TAL%20Specification%201.4/#on-error
Also the content of on-error is used without any checks, so it is
possible for badly coded templates to generate invalid XML like so:
<span petal:on-error="<">$fail/me</span>
Unless someone else fancies tackling this, a full fix will have to
wait.
So I've put a note in the pod documentation that the implementation
of on-error is incomplete, and added code to defang XML
metacharacters in the output.
--
Bruno
More information about the Petal
mailing list