mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-23 14:41:08 +00:00
Simplification
This commit is contained in:
parent
198612dac6
commit
46878f2f3d
1 changed files with 2 additions and 15 deletions
|
@ -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(" ");
|
||||
else
|
||||
sb.append(' ');
|
||||
} else
|
||||
sb.append(kar);
|
||||
}
|
||||
|
||||
sb.append(line);
|
||||
sb.append("<br>");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue