Permalink
Browse files

Escape single quotes in strings. Closes #50

  • Loading branch information...
1 parent 2184b58 commit be393aa21b25cf8737f5045bfb18db3b1b08627a @kunklejr kunklejr committed Sep 29, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/driver/base.js
View
@@ -158,7 +158,7 @@ module.exports = Base = Class.extend({
columnNames += columnNameArray[index];
if (typeof(valueArray[index]) === 'string') {
- values += "'" + valueArray[index] + "'";
+ values += "'" + valueArray[index].replace("'", "''") + "'";
} else {
values += valueArray[index];
}

1 comment on commit be393aa

chani3 commented on be393aa Jul 30, 2013

that only replaces the first instance.

Please sign in to comment.