Adapter suggestion #20

jo-lee opened this Issue Oct 24, 2013 · 1 comment

2 participants


In order to make the Adapter escape() work, I have to change the following:

// else if( isNaN(value) || value === '' )
else if( typeof(value)=="string" )
return "'" + value.replace(/'/g, "''") + "'";

It is because some strings contain numeric digits such as "1234" cannot be escaped
due to isNaN("1234") gives false!

@DrBenton DrBenton added a commit that closed this issue Jan 13, 2014
@DrBenton Fixed #20
* more accurate String params escaping
@DrBenton DrBenton closed this in b044b14 Jan 13, 2014

@jo-lee Thank you very much for this suggestion !
I've just added a unit test for that, and fixed the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment