Comparing version 6.2.4 to 6.2.5
@@ -10,2 +10,3 @@ /** | ||
var types = require('pg-types'); | ||
var escape = require('js-string-escape'); | ||
@@ -79,9 +80,9 @@ //result object returned from query | ||
return "\nthis['" + | ||
//fields containing single quotes will break | ||
//the evaluated javascript unless they are escaped | ||
//see https://github.com/brianc/node-postgres/issues/507 | ||
//Addendum: However, we need to make sure to replace all | ||
//occurences of apostrophes, not just the first one. | ||
//See https://github.com/brianc/node-postgres/issues/934 | ||
fieldName.replace(/'/g, "\\'") + | ||
// fields containing single quotes will break | ||
// the evaluated javascript unless they are escaped | ||
// see https://github.com/brianc/node-postgres/issues/507 | ||
// Addendum: However, we need to make sure to replace all | ||
// occurences of apostrophes, not just the first one. | ||
// See https://github.com/brianc/node-postgres/issues/934 | ||
escape(fieldName) + | ||
"'] = " + | ||
@@ -88,0 +89,0 @@ "rowData[" + i + "] == null ? null : parsers[" + i + "](rowData[" + i + "]);"; |
{ | ||
"name": "pg", | ||
"version": "6.2.4", | ||
"version": "6.2.5", | ||
"description": "PostgreSQL client - pure javascript & libpq with the same API", | ||
@@ -23,2 +23,3 @@ "keywords": [ | ||
"packet-reader": "0.3.1", | ||
"js-string-escape": "1.0.1", | ||
"pg-connection-string": "0.1.3", | ||
@@ -25,0 +26,0 @@ "pg-pool": "1.*", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
91103
1940
8
+ Addedjs-string-escape@1.0.1
+ Addedjs-string-escape@1.0.1(transitive)