1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-02-23 14:41:08 +00:00

Simplification

This commit is contained in:
M66B 2020-05-02 11:14:17 +02:00
parent 198612dac6
commit 46878f2f3d

View file

@ -1284,23 +1284,10 @@ public class HtmlHelper {
line = l.toString();
// Html characters
// This will handle spaces / word wrapping as well
line = Html.escapeHtml(line);
// Space characters
int len = line.length();
for (int j = 0; j < len; j++) {
char kar = line.charAt(j);
if (kar == ' ') {
// Prevent trimming start
// Keep one space for word wrapping
if (j == 0 || (j + 1 < len && line.charAt(j + 1) == ' '))
sb.append("&nbsp;");
else
sb.append(' ');
} else
sb.append(kar);
}
sb.append(line);
sb.append("<br>");
}