﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc
276,Python code in template is not executed correctly,anonymous,cmlenz,"Expected behavior: Python code in Genshi sample template below defines function ""hello()"" which produces <b>hello, world</b> in rendered template
Erroneous result: genshi.template.eval.UndefinedError: ""tag"" not defined

(I tried to use the function more() to reproduce the functionality of hello(), but it doesn't work, either, since the HTML-tags will be escaped in the output. Is there a way to avoid this?)

Sample template code:
{{{
<html xmlns=""http://www.w3.org/1999/xhtml"" xmlns:py=""http://genshi.edgewall.org/"" xmlns:xi=""http://www.w3.org/2001/XInclude"">
<head></head>
<body>
<?python
def hello():
    from genshi.builder import tag
    return tag.b('hello world')
def more():
    return '<strong>another greeting</strong>'
?>
<p>First one: ${hello()}</p>
<p>Second one: ${more()}</p>
</body>
</html>
}}}

",defect,closed,minor,0.6,Template processing,0.5,fixed,"python, execution, template",
