better format of html aps result

This commit is contained in:
Milos Kozak 2016-07-13 19:21:31 +02:00
parent 24eee0475f
commit f2bdf4bcff
2 changed files with 2 additions and 2 deletions

View file

@ -38,7 +38,7 @@ public class APSResult implements Parcelable {
else
ret = "<b>" + MainApp.sResources.getString(R.string.rate) + "</b>: " + DecimalFormatter.to2Decimal(rate) + " U/h<br>" +
"<b>" + MainApp.sResources.getString(R.string.duration) + "</b>: " + DecimalFormatter.to2Decimal(duration) + " min<br>" +
"<b>" + MainApp.sResources.getString(R.string.reason) + "</b>: " + reason;
"<b>" + MainApp.sResources.getString(R.string.reason) + "</b>: " + reason.replace("<", "&lt;").replace(">", "&gt;");
return Html.fromHtml(ret);
} else
return Html.fromHtml(MainApp.sResources.getString(R.string.nochangerequested));

View file

@ -81,7 +81,7 @@ public class JSONFormatter {
ret += visit((JSONObject) object, indent);
} else {
if (object instanceof String) {
ret += write("\"" + (String) object + "\"", indent);
ret += write("\"" + ((String) object).replace("<", "&lt;").replace(">", "&gt;") + "\"", indent);
} else {
ret += write(String.valueOf(object), indent);
}