Fixing issue in File Reader/Writer when newlines in file

This commit is contained in:
macdonst 2010-11-16 13:29:47 -05:00
parent 07418a3606
commit 5dcac6d7fe
2 changed files with 2 additions and 1 deletions

View File

@ -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();
} }

View File

@ -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) {