1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-23 18:02:15 -05:00

Fix issue 4771 - work around > getting included in URLs when linkifying text/plain emails

This commit is contained in:
David Miller 2012-12-18 09:25:38 -05:00
parent e7be8151fe
commit f282386ab0

View File

@ -248,7 +248,11 @@ public class HtmlConverter {
if (isStartOfLine) {
quotesThisLine++;
} else {
buff.append(">");
// We use a token here which can't occur in htmlified text because > is valid
// within links (where > is not), and linkifying links will include it if we
// do it here. We'll make another pass and change this back to > after
// the linkification is done.
buff.append("<gt>");
}
break;
case '\r':
@ -322,6 +326,9 @@ public class HtmlConverter {
text = sb.toString();
// Above we replaced > with <gt>, now make it &gt;
text = text.replaceAll("<gt>", "&gt;");
return text;
}