thunderbird-android icon indicating copy to clipboard operation
thunderbird-android copied to clipboard

mailto: links using percent encoding for UTF-8 encoding, avoiding RFC 2047 encoding, do not work

Open dilyanpalauzov opened this issue 3 years ago • 1 comments

Checklist

  • [X] I have used the search function to see if someone else has already submitted the same bug report.
  • [X] I will describe the problem with as much detail as possible.

App version

5.807

Where did you get the app from?

F-Droid

Android version

LineageOS

Device model

No response

Steps to reproduce

I click on the html code

<a href="mailto:?to=%D0%90%D0%BD%D0%B0%D1%81%D1%82%D0%B0%D1%81%D0%B8%D1%8F%20%3C1%40example.org%3E">zzz</a>

K9 mail opens, and contains empty TO: field.

If I take the decoded string (Анастасия), first RFC2047 ecnode it, then percent encode it, and click the link, K9 fills the TO: field. My reading of RFC6068 Examples Using UTF-8-Based Percent-Encoding is that both are equivalent:

So it is possible to skip the RFC2047 encoding and use only percent encoding on the UTF-8 data.

Expected behavior

I click on the html code

<a href="mailto:?to=%D0%90%D0%BD%D0%B0%D1%81%D1%82%D0%B0%D1%81%D0%B8%D1%8F%20%3C1%40example.org%3E">zzz</a>

K9 opens and shows empty TO: field.

Actual behavior

K9 mail shall fill To: Анастасия <[email protected]>

Logs

No response

dilyanpalauzov avatar Apr 19 '22 18:04 dilyanpalauzov

I can confirm that this should work.

For the addresses in a mailto URI we're using the same parser that is used when parsing headers. Currently that parser doesn't support (unencoded) non-ASCII characters.

Related:

  • #2633

cketti avatar Apr 19 '22 19:04 cketti