escaping only double quotes

iapain iapain at gmail.com
Fri Aug 31 12:43:45 EDT 2007


You could write a simple escape function.

def escape(html):
    "Return the given TEXT with ampersands, quotes and carets
encoded."
    return html.replace('&', '&').replace('<',
'<').replace('>', '>').replace('"', '"').replace("'",
''')




More information about the Python-list mailing list