Normalize html line breaks

This commit is contained in:
M66B
2019-08-22 18:12:30 +02:00
parent 69fbc51b8e
commit 081d25940a
7 changed files with 9 additions and 9 deletions

View File

@@ -612,7 +612,7 @@ public class FragmentCompose extends FragmentBase {
String ref = Helper.readText(refFile);
String plain = HtmlHelper.getText(ref);
String html = "<p>" + plain.replaceAll("\\r?\\n", "<br />") + "</p>";
String html = "<p>" + plain.replaceAll("\\r?\\n", "<br>") + "</p>";
try (BufferedWriter out = new BufferedWriter(new FileWriter(file))) {
out.write(body);
@@ -2041,7 +2041,7 @@ public class FragmentCompose extends FragmentBase {
draft.subject = args.getString("subject", "");
body = args.getString("body", "");
body = body.replaceAll("\\r?\\n", "<br />");
body = body.replaceAll("\\r?\\n", "<br>");
if (answer > 0) {
EntityAnswer a = db.answer().getAnswer(answer);