merge from 3.2

This commit is contained in:
Senthil Kumaran 2011-09-13 07:14:39 +08:00
commit e012c02a5c
1 changed files with 2 additions and 1 deletions

View File

@ -13,7 +13,8 @@ def escape(s, quote=True):
""" """
Replace special characters "&", "<" and ">" to HTML-safe sequences. Replace special characters "&", "<" and ">" to HTML-safe sequences.
If the optional flag quote is true (the default), the quotation mark If the optional flag quote is true (the default), the quotation mark
character (") is also translated. characters, both double quote (") and single quote (') characters are also
translated.
""" """
if quote: if quote:
return s.translate(_escape_map_full) return s.translate(_escape_map_full)