mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-22 00:32:55 +08:00
Fixing issue in File Reader/Writer when newlines in file
This commit is contained in:
parent
07418a3606
commit
5dcac6d7fe
@ -175,6 +175,7 @@ public class FileUtils extends Plugin {
|
|||||||
String line;
|
String line;
|
||||||
while ((line = reader.readLine()) != null) {
|
while ((line = reader.readLine()) != null) {
|
||||||
data.append(line);
|
data.append(line);
|
||||||
|
data.append('\n');
|
||||||
}
|
}
|
||||||
return data.toString();
|
return data.toString();
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ public class PluginResult {
|
|||||||
|
|
||||||
public PluginResult(Status status, String message) {
|
public PluginResult(Status status, String message) {
|
||||||
this.status = status.ordinal();
|
this.status = status.ordinal();
|
||||||
this.message = "'" + message + "'";
|
this.message = JSONObject.quote(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
public PluginResult(Status status, JSONArray message) {
|
public PluginResult(Status status, JSONArray message) {
|
||||||
|
Loading…
Reference in New Issue
Block a user