mailto: tag does not work with unescaped spaces (e.g., in subject)

RESOLVED FIXED in Thunderbird1.1


Message Compose Window
14 years ago
13 years ago


(Reporter: Terry Sanderson, Assigned: Scott MacGregor)



Firefox Tracking Flags

(Not tracked)


(Whiteboard: fixed-aviary1.0)


(1 attachment, 1 obsolete attachment)



14 years ago
User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; MSOCD; Q312461; .NET CLR 1.1.4322)
Build Identifier: Thunderbird 0.4 (20031205)

Trying to use Thunderbird to reply to an email address on a web page. When I 
put the cursor over the email address, the status bar shows: blah blah

Clicking on the email address, the Thunderbird window comes to the foreground 
but a compose window does not appear. I have confirmed that if it is a simple 
mailto: with no subject option, the compose window appears.


Reproducible: Always

Steps to Reproduce:
1. Find a mailto: tag with a subject option
2. Click on the email address

Actual Results:  
No compose window appears.

Comment 1

14 years ago
Further information:

This appears to be intermittent. Some mailto: tags with the subject option 
work, like:


works, but:

<A HREF=" application from 

doesn't )Could it be the length of the subject line?)


Comment 2

14 years ago
I have the same problem. But it's only for mailto-Links with spaces in the
subject. Other mailto-Links are ok.

Reproducible: Always

Comment 3

14 years ago
I have a similar problem, but it only occurs if there is a space character in
the subject. Using a %20 in place of the space is a workaround...

Comment 4

14 years ago
Yes, you are right %20 is a workaround. But most of the links in the internet
don't have that workaround :(

Comment 5

14 years ago
I get this too. Windows XP, Build Mozilla Thunderbird 0.5a (20040120)

Comment 6

14 years ago
Bug still present in Mozilla Thunderbird 0.5b (20040201) under Windows 2000.
I see this on Mac OS X 10.3 also (using Firefox as default browser and
Thunderbird as default mailer).   Quite annoying.  :-)
Ever confirmed: true
OS: Windows 2000 → All
Hardware: PC → All

Comment 8

14 years ago
I also see the same bug.
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6)
Gecko/20040206 Firefox/0.8
Build: Mozilla Thunderbird 0.5 (20040207)

Two things to add:

*) appearently having thunderbird closed when clicking the link (so that it must
start thunderbird) appears to improve results somewhat.  The compose window does


this mailto contains a single space (between 'Rift' and 'Escapes').  If you
click this link when Thunderbird is closed, the compose window will open. 
However, the subject line will contain 'UID 2922, Rift'.  It is incomplete.

Comment 9

14 years ago
Same problem here - but when Thunderbird is closed, it loads for only a second
or so and then exits again. No window is displayed. op artikel: PvdA wil diplomaplicht
invoeren  ( )

Apparently spaces in the subject tag cause the problem.

Comment 10

14 years ago
Under the applicable RFCs, the use of spaces in URIs (including mailto: URIs) is
invalid unless encoded as %20.

Comment 11

14 years ago
(In reply to comment #10)
> Under the applicable RFCs, the use of spaces in URIs (including mailto: URIs) is
> invalid unless encoded as %20.

Seconding what Dan said.

"Thus, only alphanumerics, the special characters $-_.+!*'(),, and reserved
characters used for their reserved purposes may be used unencoded within a URL."

Dollar sign, hyphen, underscore, period, plus, exclamation point, asterisk,
apostrophe, left and right parentheses, and comma are the only non-alphanumeric
characters allowed.

It's true that many clients support the space. I don't know whether this could
be supported without breaking other standards. If it could be added without
mucking up anything else, that would improve user-friendliness.


14 years ago
Summary: mailto: tag does not work with ?subject option → mailto: tag does not work with unescaped spaces (e.g., in subject)

Comment 12

14 years ago
INVALID. Spaces should always be escaped in URIs.
Last Resolved: 14 years ago
Resolution: --- → INVALID

Comment 13

14 years ago
Very strange. Since I use Firefox 0.8 and Thunderbird 0.6 it work for me. Look
at The first link is with %20 and the second
only has the spaces.

But I don't know if the problem is solved by Firefox or Thunderbird !?!
Can someone confirm this?

Comment 14

14 years ago
I have created enhancement request 243381.

Comment 15

14 years ago
re-opening. I get too many customer complaints about not handling this case even
if it is bogus.
Resolution: INVALID → ---
Target Milestone: --- → Thunderbird0.7

Comment 16

14 years ago
*** Bug 243381 has been marked as a duplicate of this bug. ***

Comment 17

14 years ago
the first failure point is here:

where the xre's generic command line handler parses the arguments and builds
them up into command line arguments. Arguments are delimited by space. So:

thunderbird.exe -compose

gets turned into 3 command line arguments which the command line service then
anaylzes. If the mailto url has raw spaces in it we end up creating additional
command line arguments (one for each 'naked' word after the mailto) which we
later have no idea how to handle.

This is going to be pretty tricky to generically make this work in the command
line service

Comment 18

14 years ago
so, you might just have to assume if the command line arg is -compose, and you
get ?subject, there are no more command line args. Not sure I see any other way
around it...I suppose you could look for -char command lines args after, but I'm
not sure they're really valid in mailto urls, because mailto urls need to be
fairly generic...

Comment 19

14 years ago
Created attachment 148550 [details] [diff] [review]
the fix

could it really be this easy?

Comment 20

14 years ago
yes it was too good to be true. This fixes it if Thunderbird is already running
but not when thunderbird needs started.

Comment 21

14 years ago
Created attachment 148552 [details] [diff] [review]
the fix for starting from the command line and for receiving a DDE request
Attachment #148550 - Attachment is obsolete: true


14 years ago
Attachment #148552 - Flags: superreview+

Comment 22

14 years ago
fixed on the aviary 1.0 branch and the old M4 branch. Leaving open for landing
on the trunk.
Whiteboard: fixed-aviary1.0

Comment 23

14 years ago
this bug is left open 'cause i haven't landed it on the trunk yet. not a 0.7
stopper since it's already in 0.7
Target Milestone: Thunderbird0.7 → Thunderbird0.8

Comment 24

14 years ago
this is already fixed in the 1.0 branch. I need to get it reviewed for the trunk
by the right folks. 
Target Milestone: Thunderbird0.8 → Thunderbird0.9


13 years ago
Target Milestone: Thunderbird0.9 → Thunderbird1.1

Comment 25

13 years ago
this is now fixed on the trunk too
Last Resolved: 14 years ago13 years ago
Resolution: --- → FIXED

Comment 26

13 years ago
I can't believe we're doing this. Why can't we just fix the client side to make
sure the URL is escaped properly? Or are we talking about non-moz clients?
You need to log in before you can comment on or make changes to this bug.