Re: escaping only double quotes

2007-08-31 Thread iapain
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("'", ''') -- http://mail.python.org/mailman/listinfo/python-list

Re: escaping only double quotes

2007-08-31 Thread iapain
> string = "Butler's 15\" TV" > s = """my string goes here "%s" """ % string Couldn't find anything wrong in string = "Butler's 15\" TV" s = "my string goes here %s" % string -- http://mail.python.org/mailman/listinfo/python-list