[stringtemplate-interest] Rendering separator={} and null={}

Roman Odaisky roma at qwertty.com
Tue Sep 16 10:26:40 PDT 2008


Greetings,

I have an renderer that performs HTML escaping. For some reason it gets 
applied to content of null={...} and separator={...}.

For example, I have

$some_list:{...}; separator="<hr />"$

I get “&lt;hr /&gt;”.

If I append “format="safe"” the renderer doesn’t get the setting; only if I 
change "" to {}, will I get the desired result, this way:

$some_list:{...}; separator={<hr />}, format="safe"$

However, this will likely prevent the renderer from doing its job elsewhere 
within the template.

Is this a bug or a feature? I expected {} and "" templates not to pass through 
the renderer at all.

Also, is it possible to specify the format for null and separator expressions?

PyST 3.1.

-- 
WBR
Roman.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2286 bytes
Desc: not available
Url : http://www.antlr.org:8080/pipermail/stringtemplate-interest/attachments/20080916/0df89c85/attachment.bin 


More information about the stringtemplate-interest mailing list