diff -r 1a1c494b88e2 -r 0b974e21d762 common/tags.py --- 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')