Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS mailto Link with newline (%0A) is Converted to <BR>

The link below is recently failing to have line breaks when it opens in the Mail app.

<a href="mailto:[email protected]?subject=Question&body=%0A%0A%0A----------%0AVersion: 2.0%0ABuild: 12345" id="address">support by email</a>

Instead, it is appearing like this in the Mail app:

<BR><BR><BR>----------<BR>Version: 2.0<BR>Build: 12345

but should appear like:

enter image description here

It was working in iOS 13, but now no longer. I have noticed this same behavior with another app and similar %0A. It also occurs when using %0D%0A

The spaces are being coded to %20 by javascript.

Has anyone else seen this or have ideas to try?

Edit: filed bug report FB9146675. Please consider doing the same. Only if there is emphasis on a topic will it be seen.

like image 896
David Avatar asked Jun 04 '21 21:06

David


People also ask

How do you insert a line break in mailto?

Use Encoding %0D%0A in mailto body to line break. This is the only valid way to generate a line break of content/text in the body.

How do I start a new line in IOS?

Double-tap where you want the break to occur. Tap Insert, then tap Line Break or Page Break.


1 Answers

This is a bug which has apparently been fixed in iOS 15.

like image 185
B. Martin Avatar answered Sep 23 '22 06:09

B. Martin