def _safe(text):
 return text.replace("'", "''").replace('\\', '\\\\')

def _safe ( text ) : return text . replace ( "'" , "''" ) . replace ( '\\' , '\\\\' )
something really stupid that replaces quotes with escaped quotes .