[Petal] 'Else' without using the ugly syntax

Jean-Michel Hiver jhiver at mkdoc.com
Mon Dec 22 10:23:01 GMT 2003


> Some of my customers use tools like VietDev to input HTML text into
> textarea, which are then going to be displayed on their web sites.
> For instance, they insert some news using <br /> or <b></b> tags.
> 
> Problem is that Petal parses all tags and converts angular parenthesis
> into &lt; , &gt; , which I find it fantastic almost in all cases,
> but not in this one.

perldoc Petal

====================== %< ======================
content
                                                                                Abstract
                                                                                
  <tag tal:content="EXPRESSION">Dummy Data To Replace With   
EXPRESSION</tag>
                                                                                
By default, the characters greater than, lesser than, double quote and
ampersand are encoded to the entities &lt;, &gt;, &quot; and &amp;
respectively.  If you don’t want them to (because the result of your
expression is already encoded) you have to use the "structure" keyword.
                                                                                Example
                                                                                  <span tal:content="title">Dummy Title</span>
                                                                                <span tal:content="structure some/variable">
    blah blah blah
</span>
====================== >% ======================


> Is there any workaround to allow the insertion of HTML tags into
> Petal templates?

See above.
Cheers,


More information about the Petal mailing list