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

Merge pull request #218 from justdave/issue4771

Fix issue 4771 - work around > getting included in URLs when linkifying text/plain emails
This commit is contained in:
cketti 2012-12-18 08:04:25 -08:00
commit 3b519adf40

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;
}