[Twisted-Python] PATCH: adbapi.py string escaping
glyph at twistedmatrix.com
Tue Dec 3 20:27:24 EST 2002
On 21 Nov 2002 01:39:32 -0800, Dave Peticolas <dave at krondo.com> wrote:
> 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.
I'm committing this patch, even though it's not really correct, since AFAIK
nobody is using Twisted with a different database :-).
We should probably be doing escaping using DB-API's interpolation facilities to
make sure that it's right for each database (and if it isn't it becomes a
driver problem, not a Twisted problem).
| <`'> | Glyph Lefkowitz: Traveling Sorcerer |
| < _/ > | Lead Developer, the Twisted project |
| < ___/ > | http://www.twistedmatrix.com |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20021203/7172ad2d/attachment.pgp
More information about the Twisted-Python