From: <Z3...@us...> - 2009-10-02 23:47:19
|
Revision: 283 http://spd.svn.sourceforge.net/spd/?rev=283&view=rev Author: Z3po Date: 2009-10-02 23:47:09 +0000 (Fri, 02 Oct 2009) Log Message: ----------- Fixed bug with single quotes inside of a value while inserting it in sqlite. The Clue is to have another single quote in front of it (to escape it) Modified Paths: -------------- trunk/src/spdCore.py Modified: trunk/src/spdCore.py =================================================================== --- trunk/src/spdCore.py 2009-09-13 17:27:49 UTC (rev 282) +++ trunk/src/spdCore.py 2009-10-02 23:47:09 UTC (rev 283) @@ -310,8 +310,10 @@ cursor = self.__sql.cursor() insertValues = '' for collumns in entry: + entry[collumns] = re.sub(r'\'','\'\'', entry[collumns]) insertValues += "'" + entry[collumns] + "'," + insertValues = re.sub(r',$',r'', insertValues) try: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |