diff DBInterface.py @ 4:0ade331198de

first version of ZDBInlineSearch
author casties
date Tue, 15 Feb 2011 19:59:07 +0100
parents d70e57193731
children 1b25a85a2165
line wrap: on
line diff
--- a/DBInterface.py	Mon Feb 14 23:20:43 2011 +0100
+++ b/DBInterface.py	Tue Feb 15 19:59:07 2011 +0100
@@ -53,13 +53,13 @@
            rc = rc + node.data
     return rc
 
-def sqlName(s,lc=True):
+def sqlName(s, lc=True, more=''):
     """returns restricted ASCII-only version of string"""
     if s is None:
         return ""
     
     # all else -> "_"
-    s = re.sub(r'[^A-Za-z0-9_]','_',s)
+    s = re.sub('[^A-Za-z0-9_'+more+']','_',s)
     if lc:
         return s.lower()