Skip to content
This repository has been archived by the owner on Aug 19, 2021. It is now read-only.

Commit

Permalink
Fix for multiple single quotes in a string. db-migrate#50
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Romanko committed Dec 17, 2013
1 parent 79e96d0 commit 7b3f246
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/driver/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ module.exports = Base = Class.extend({
columnNames += columnNameArray[index];

if (typeof(valueArray[index]) === 'string') {
values += "'" + valueArray[index].replace("'", "''") + "'";
values += "'" + valueArray[index].replace(/'/g, "''") + "'";
} else {
values += valueArray[index];
}
Expand Down

0 comments on commit 7b3f246

Please sign in to comment.