1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-01-03 21:55:13 +00:00

Workaround wrongly encoded mailto links

This commit is contained in:
M66B 2019-06-06 11:05:00 +02:00
parent fe4e7ebeeb
commit c68ca3fa4c

View file

@ -85,7 +85,12 @@ public class ActivityCompose extends ActivityBilling implements FragmentManager.
Uri uri = intent.getData();
if (uri != null && "mailto".equals(uri.getScheme())) {
// https://www.ietf.org/rfc/rfc2368.txt
MailTo mailto = MailTo.parse(uri.toString());
String url = uri.toString();
int query = url.indexOf('?', MailTo.MAILTO_SCHEME.length());
if (query > 0)
url = url.substring(0, query) + url.substring(query).replace(":", "%3A");
MailTo mailto = MailTo.parse(url);
String to = mailto.getTo();
if (to != null)