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

fix for "http:/"-links in plaintext -emails. (add http:// is a link has no schema)

This commit is contained in:
Marcus Wolschon 2010-11-04 13:35:39 +00:00
parent 5b88a99de0
commit 4aba667a4e

View File

@ -2502,7 +2502,11 @@ public class LocalStore extends Store implements Serializable
int start = m.start();
if (start == 0 || (start != 0 && text.charAt(start - 1) != '@'))
{
m.appendReplacement(sb, "<a href=\"$0\">$0</a>");
if (m.group().indexOf(':') > 0) { // With no URI-schema we may get "http:/" links with the second / missing
m.appendReplacement(sb, "<a href=\"$0\">$0</a>");
} else {
m.appendReplacement(sb, "<a href=\"http://$0\">$0</a>");
}
}
else
{