--- a/common/uilib.py Thu Apr 30 17:36:33 2009 +0200
+++ b/common/uilib.py Thu Apr 30 18:11:42 2009 +0200
@@ -204,7 +204,7 @@
# HTML generation helper functions ############################################
-def simple_sgml_tag(tag, content=None, **attrs):
+def simple_sgml_tag(tag, content=None, escapecontent=True, **attrs):
"""generation of a simple sgml tag (eg without children tags) easier
content and attributes will be escaped
@@ -219,7 +219,9 @@
for attr, value in attrs.items()
if value is not None)
if content:
- value += u'>%s</%s>' % (html_escape(unicode(content)), tag)
+ if escapecontent:
+ content = html_escape(unicode(content))
+ value += u'>%s</%s>' % (content, tag)
else:
value += u'/>'
return value