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 committed by Jesse Vincent
parent aaae5ba4c5
commit fb719d5b78
1 changed files with 7 additions and 3 deletions

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;");
@ -1112,7 +1116,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() {