common/tags.py
branchtls-sprint
changeset 1623 0b974e21d762
parent 1065 0a37f90acb13
child 1647 9936aca2453d
--- a/common/tags.py	Thu Apr 30 17:36:33 2009 +0200
+++ b/common/tags.py	Thu Apr 30 18:11:42 2009 +0200
@@ -9,17 +9,19 @@
 from cubicweb.common.uilib import simple_sgml_tag
 
 class tag(object):
-    def __init__(self, name):
+    def __init__(self, name, escapecontent=True):
         self.name = name
-        
+        self.escapecontent = escapecontent
+
     def __call__(self, __content=None, **attrs):
+        attrs.setdefault('escapecontent', self.escapecontent)
         return simple_sgml_tag(self.name, __content, **attrs)
 
 input = tag('input')
 textarea = tag('textarea')
 a = tag('a')
 span = tag('span')
-div = tag('div')
+div = tag('div', False)
 img = tag('img')
 label = tag('label')
 option = tag('option')