cubicweb #344346 tags escape by default [rejected]
the cw.common.tags is supposed to alleviate the pain of handwritting html tags but as of currently, they are mostly unusable, since they escape by default:
>>> from cubicweb.common.tags import h1, span >>> h1(span(u'toto')) u'<h1><span>toto</span></h1>'
which defeats the whole thing
the correct version is:
>>> h1(span(u'toto'), escapecontent=False) u'<h1><span>toto</span></h1>'
I propose that we immediately make escapecontent False by default and keep going with html_escape, until a proper autoescaping mecanism is devised (that would probably mean building a symbolic tree rather than immediate string interpolation, be backwards compatible, make the View.w function a bit smarter)
|closed by||<not specified>|