version 1.36, 2004/09/27 20:43:58
|
version 1.38, 2004/09/27 20:48:54
|
Line 13 from Products.PageTemplates.PageTemplate
|
Line 13 from Products.PageTemplates.PageTemplate
|
from Products.ZSQLMethods.SQL import SQLConnectionIDs |
from Products.ZSQLMethods.SQL import SQLConnectionIDs |
import Shared.DC.ZRDB.DA |
import Shared.DC.ZRDB.DA |
|
|
def sql_quote(self, v): |
def sql_quote(v): |
# quote dictionary |
# quote dictionary |
quote_dict = {"\'": "''", "\\": "\\\\"} |
quote_dict = {"\'": "''", "\\": "\\\\"} |
for dkey in quote_dict.keys(): |
for dkey in quote_dict.keys(): |
if find(v, dkey) >= 0: |
if string.find(v, dkey) >= 0: |
v=join(split(v,dkey),quote_dict[dkey]) |
v=join(split(v,dkey),quote_dict[dkey]) |
return "'%s'" % v |
return "'%s'" % v |
|
|