不要怂,就是干,撸起袖子干!

Commit cc023c94 by sdepold

fixed wrong single quote escaping for postgresql

1 parent 0de42d92
Showing with 6 additions and 1 deletions
...@@ -15,7 +15,12 @@ function addQuotes(s, quoteChar) { ...@@ -15,7 +15,12 @@ function addQuotes(s, quoteChar) {
function pgEscape(s) { function pgEscape(s) {
s = Utils.escape(s) s = Utils.escape(s)
if (typeof s == 'string') s = s.replace(/\\"/g, '"')
if (typeof s == 'string') {
// http://www.postgresql.org/docs/8.2/static/sql-syntax-lexical.html#SQL-SYNTAX-STRINGS
s = s.replace(/\\'/g, "''")
}
return s return s
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!