Re: Problems with on-error?

Bruno Postle <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.petal
Message-ID <[email protected]>
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="&lt;">$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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.