Adapter suggestion #20

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

2 participants

@jo-lee

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
b044b14
@DrBenton DrBenton closed this in b044b14 Jan 13, 2014
@DrBenton
Owner

@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