Closed Bug 220376 Opened 21 years ago Closed 21 years ago

Mozilla ignores/filters embedded newlines in href mailto links

Categories

(SeaMonkey :: MailNews: Message Display, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 220099

People

(Reporter: eruby, Assigned: sspitzer)

References

()

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624

When clicking a link in a web page such as:

<a
href="mailto:support@mozilla.org?subject=Embedded%20Newline&body=Line1%0D%0ALine2">Send
Some Mail</a>

... pops up a Mozilla mail editing window, but in the body of the message you see:

Line 1 Line 2

... when you should be seeing:

Line 1
Line 2


%0D, %0A, and %0D%0A should all be interpreted as "newline" by Mozilla Mail.


Reproducible: Always

Steps to Reproduce:
1. Put the link listed in the details in an HTML page.
2. Click it.
3. Behold!

Actual Results:  
A Mozilla mail editing window pops up and in the body of the message you see:

Line 1 Line 2

Expected Results:  
A Mozilla mail editing window pops up and in the body of the message you see:

Line 1
Line 2
I hereby wish to confirm this bug for Mozilla 1.5 (Mozilla/5.0 (Windows; U;
Windows NT 5.0; en-US; rv:1.5) Gecko/20031007). I'm observing the same as
reported here, that is, URL-encoded newlines are lost in the body of the email.

It seems that 1.5 decodes the mailto twice, because I found that with the
following workaround (double encoding) the body is displayed with newlines: 
<a href="mailto:somebody@somewhere.com?body=Line%2520one%250DLine%2520two">works
in 1.5</a>

In 1.4 (Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624),
decoding works as expected and the above example yields the following body:
"Line%20one%0DLine%20two", as expected.

*** This bug has been marked as a duplicate of 220099 ***
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → DUPLICATE
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.