Commit ec2687e1 authored by Jim Fulton's avatar Jim Fulton

Now use exported sql quote function to quote strings.

parent dfd07748
......@@ -46,7 +46,7 @@
'and' or 'or' tag, otherwise, no text is inserted.
'''
__rcs_id__='$Id: sqltest.py,v 1.3 1998/04/15 14:56:13 jim Exp $'
__rcs_id__='$Id: sqltest.py,v 1.4 1998/04/27 18:57:23 jim Exp $'
############################################################################
# Copyright
......@@ -56,7 +56,7 @@ __rcs_id__='$Id: sqltest.py,v 1.3 1998/04/15 14:56:13 jim Exp $'
# rights reserved.
#
############################################################################
__version__='$Revision: 1.3 $'[11:-2]
__version__='$Revision: 1.4 $'[11:-2]
from DocumentTemplate.DT_Util import *
......@@ -118,8 +118,9 @@ class SQLTest:
'Invalid floating-point value for <em>%s</em>' % name)
else:
v=str(v)
if find(v,"\'") >= 0: v=join(split(v,"\'"),"''")
v="'%s'" % v
v=md.getitem('sql_quote',0)(v)
#if find(v,"\'") >= 0: v=join(split(v,"\'"),"''")
#v="'%s'" % v
vs.append(v)
......@@ -139,6 +140,9 @@ valid_type={'int':1, 'float':1, 'string':1, 'nb': 1}.has_key
############################################################################
# $Log: sqltest.py,v $
# Revision 1.4 1998/04/27 18:57:23 jim
# Now use exported sql quote function to quote strings.
#
# Revision 1.3 1998/04/15 14:56:13 jim
# Fixed problem in handling optional tests.
#
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment