Python 3.2 and html.escape function

Gerald Britton gerald.britton at gmail.com
Sun Feb 20 12:51:11 EST 2011


Forgot to include the reference:

http://docs.python.org/dev/whatsnew/3.2.html

html
A new html module was introduced with only a single function,
escape(), which is used for escaping reserved characters from HTML
markup:

>>> import html
>>> html.escape('x > 2 && x < 7')
'x > 2 && x < 7'

-- 
Gerald Britton



More information about the Python-list mailing list