simov / express-admin

MySQL, MariaDB, PostgreSQL, SQLite admin for Node.js
MIT License
1.17k stars 223 forks source link

Special character ' causing an error in admin text field on save #69

Closed emekanw closed 10 years ago

emekanw commented 10 years ago

When I try to save in the admin I get an error because of this character Apostrophe (') . Thanks

simov commented 10 years ago

Hi, @emekanw

I was escaping the single quotes in a non standard way which worked on mysql. And I haven't any tests on inserting strings with single quotes into the database, so this is how this bug passed.

The fix is here https://github.com/simov/xsql/commit/856ca73311ca4c7cf59e15030c22835b9432c9be

This module is used in the latest master branch of Express Admin which isn't released on npm yet.

So for now you need to pull the latest master and do npm install