1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-12-25 00:58:50 -05:00

Issue 3105: Drop newlines in favor of preserving multiple spaces in htmlified text bodies.

This commit is contained in:
Andrew Chen 2011-05-05 13:52:28 -07:00
parent cfd1ad7cdb
commit e12dd323f8

View File

@ -142,7 +142,9 @@ public class HtmlConverter {
while ((c = reader.read()) != -1) {
switch (c) {
case '\n':
buff.append("<br/>\n");
// pine treats <br> as two newlines, but <br/> as one newline. Use <br/> so our messages aren't
// doublespaced.
buff.append("<br />");
break;
case '\r':
break;
@ -182,7 +184,9 @@ public class HtmlConverter {
while ((c = reader.read()) != -1) {
switch (c) {
case '\n':
buff.append("<br/>\n");
// pine treats <br> as two newlines, but <br/> as one newline. Use <br/> so our messages aren't
// doublespaced.
buff.append("<br />");
break;
case '&':
buff.append("&amp;");
@ -1118,7 +1122,7 @@ public class HtmlConverter {
final String font = K9.messageViewFixedWidthFont()
? "monospace"
: "sans-serif";
return "<pre style=\"white-space: normal; word-wrap:break-word; font-family: " + font + "\">";
return "<pre style=\"white-space: pre-wrap; word-wrap:break-word; font-family: " + font + "\">";
}
private static String htmlifyMessageFooter() {