Quantcast
Channel: review/cwtags Changelog
Viewing all articles
Browse latest Browse all 75

Automatic escaping (closes #620533)

$
0
0
changeset f1a75d0bc37e
branch
bookmark
tag
user Aurelien Campeas <aurelien.campeas@logilab.fr>
description Automatic escaping (closes #620533)

For backward compatibility reasons, the tag module remains as before,
completely non-escaping.

The new etag (using the new etagbuilder) provides escaping tags:

* content and attributes:

div('Babar > RataxÚs', title='inequality & big mammals')

* the standard cubicweb stream remains unescaping however, hence:

with div(w, title='inequality & big mammals'):
w(xml_escape('Babar > RataxÚs'))

For this to work, an alternative escaping writer should used.

* an alternative escaping writer is provided for CubicWeb use:

ew('Babar > RataxÚs')


It remains to be seen how it can be made easily available.
files __init__.py
etag.py
etagbuilder.py
tagbuilder.py
test/unittest_tags.py

Viewing all articles
Browse latest Browse all 75

Trending Articles