Inline edit did not work with strings containing single quotes

This commit is contained in:
Marc Delisle
2010-12-31 06:41:11 -05:00
parent ecdbb6dcc7
commit c19200e4e2

View File

@@ -619,7 +619,7 @@ $(document).ready(function() {
if(value.length == 0) {
value = 'NULL'
}
sql_query += ' ' + key + "='" + value + "' , ";
sql_query += ' ' + key + "='" + value.replace(/'/g, "''") + "' , ";
})
//Remove the last ',' appended in the above loop
sql_query = sql_query.replace(/,\s$/, '');