Bug 80165 - [testcase] mailto url eg <a href="mailto:foo#b@c.com">blah</a> is clipped to just foo
Summary: [testcase] mailto url eg <a href="mailto:foo#b@c.com">blah</a> is clipped to ...
Status: RESOLVED NOT A BUG
Alias: None
Product: konqueror
Classification: Applications
Component: khtml parsing (show other bugs)
Version: 4.0.1
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
: 171528 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-04-23 03:47 UTC by Alan R
Modified: 2008-09-29 18:16 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
testcase for # in mailto (107 bytes, text/html)
2004-11-29 02:28 UTC, lexual
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alan R 2004-04-23 03:47:14 UTC
Version:            (using KDE KDE 3.2.1)
Installed from:    Mandrake RPMs
OS:          Linux

if the localpart of the to-address in a mailto contains a '#' then the address is truncated.
Comment 1 lexual 2004-11-29 02:26:10 UTC
confirming for kde 3.3.1
I'm assuming this is a legal email address[?]

In attached testcase [which works with mozilla 1.7.3], statusbar shows:
foo
bam@something.com
Instead of:
foo#b@c.com
bam@something.com

Using kmail as mail handler, clicking on links brings up composition with:
1st link: To field empty
2nd link: To field correct as bam@something.com
Comment 2 lexual 2004-11-29 02:28:01 UTC
Created attachment 8472 [details]
testcase for # in mailto

forgot to attach ;)
Comment 3 hads 2008-03-19 09:41:25 UTC
I can confirm this bug still exists in Konqueror KDE 3.5.9. In fact the # doesn't have to be in the localpart of the address or the address at all. Any link with a # in it will be cut off such as;

mailto:test@example.com?subject=This will be #cut off
Comment 4 hads 2008-03-19 10:13:36 UTC
Apologies for the duplicate post. I just noticed that you can work around the issue;

mailto:test@example.com?subject=This will not be %23cut off
Comment 5 Maksim Orlovich 2008-09-26 20:00:48 UTC
*** Bug 171528 has been marked as a duplicate of this bug. ***
Comment 6 David Faure 2008-09-29 18:16:43 UTC
Using %23 is not a workaround, it's the proper way of writing such URLs.

I tried in Firefox, and when clicking on mailto:foo#b@c.com or on mailto:null@kde.org?subject=hello#world and choosing "Gmail" in the popup dialog, I see the same truncation as happens in konqueror. This is because the part after the # is parsed as a fragment in both apps.

Try http://email.about.com/library/misc/blmailto_encoder.htm for instance: it will encode it as well -- at least in the subject. They forgot to escape special chars in the To field itself, I just wrote to them about that.

RFC 3986 ( http://www.rfc.net/rfc3986.html#s3. ) is quite clear: the # should be encoded, since a#b@kde.org is the path, and anything after '#' is normally the fragment.

Many characters have to be encoded in the mailto URI (hence pages, '#' is just one of them.