[Twisted-Python] PATCH: adbapi.py string escaping

Dave Peticolas dave at krondo.com
Thu Nov 21 04:39:32 EST 2002


The 'safe' function in twisted.enterprise.adbapi escapes single
quotes, but I know at least Postgres and MySQL also accept backslash
escapes, which means embedded backslashes need to be escaped as well,
or they will be removed.

The attached patch escapes embedded backslashes. I haven't tested
it on databases other than Postgres or MySQL.

dave

-------------- next part --------------
A non-text attachment was scrubbed...
Name: twisted.patch
Type: text/x-patch
Size: 474 bytes
Desc: not available
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20021121/86bb6775/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20021121/86bb6775/attachment.pgp 


More information about the Twisted-Python mailing list