mirror of
https://github.com/apache/cordova-android.git
synced 2026-04-23 00:00:09 +08:00
Fix for troublesome values being returned from DroidDB stores. Stick to one level of JSON serialization.
This commit is contained in:
@@ -172,12 +172,12 @@ public class Storage extends Plugin {
|
||||
try {
|
||||
for (int i = 0; i < colCount; ++i) {
|
||||
key = cur.getColumnName(i);
|
||||
value = cur.getString(i).replace("\"", "\\\""); // must escape " with \" for JavaScript
|
||||
value = cur.getString(i);
|
||||
result.put(key, value);
|
||||
}
|
||||
|
||||
|
||||
// Send row back to JavaScript
|
||||
this.sendJavascript("droiddb.addResult('" + result.toString() + "','" + tx_id + "');");
|
||||
this.sendJavascript("droiddb.addResult(" + result.toString() + ",'" + tx_id + "');");
|
||||
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
|
||||
Reference in New Issue
Block a user