Bug 206269 - mailto links only read up to first hash (#) symbol
Summary: mailto links only read up to first hash (#) symbol
Status: RESOLVED FIXED
Alias: None
Product: kmail2
Classification: Applications
Component: general (show other bugs)
Version: 5.16.3
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-04 19:05 UTC by Thomas Moschny
Modified: 2021-05-15 07:05 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.17.2


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Moschny 2009-09-04 19:05:25 UTC
Version:            (using KDE 4.3.0)
OS:                Linux
Installed from:    Fedora RPMs

When clicking on a mailto link like this:
  "mailto:john@test.example?subject=x%23z&body=line%201%0aline%202"
within konqueror, kmail opens with a Subject: of "x" only, and no body text. Seems the mailto link is cut at the hash symbol (%23).

Calling kmailservice with the mailto link
  "mailto:john@test.example?subject=x%23z&body=line%201%0aline%202"
(which is identical to the one above, but with HTML quoting of the ampersand removed) works fine, and yields a prefilled subject line of 'x#z' in kmail.

So, I'm not sure if kmail really is to blame, or maybe it is a bug in konqueror?
Comment 1 Martin Koller 2009-09-04 22:59:43 UTC
Clicking on a mailto: URL is a problem within konqueror/KHTML and not in kmail (hovering over such a link does already not show the # character in the statusbar)
Reassigning.
Comment 3 Jos van den Oever 2021-01-28 16:01:34 UTC
An escaping problem also occurs with '&' in subject or body.

kmail 'mailto:team@example.com?subject=A%26B&body=D%26C'

gives

Subject: A
Body: D&c=

but it should be:

Subject: A&B
Body: D&C
Comment 4 Jos van den Oever 2021-01-28 16:03:21 UTC
This happens in KMail Version 5.15.2 (20.08.2)
Comment 5 Jos van den Oever 2021-05-03 13:16:23 UTC
This bug is still present in KMail version 5.16.3 (20.12.3)

I tested with the command from Comment 3.
https://bugs.kde.org/show_bug.cgi?id=206269#c3
Comment 6 Jos van den Oever 2021-05-03 13:22:14 UTC
Assigning back to KMail because a comment points out that the bug is there with an easy way to reproduce the problem.
Comment 7 Laurent Montel 2021-05-15 07:05:54 UTC
Git commit 6c4fd41ee3ffc5227f805d65091775d556486aef by Laurent Montel.
Committed on 15/05/2021 at 07:05.
Pushed by mlaurent into branch 'release/21.04'.

Fix bug 206269 "An escaping problem also occurs with '&' in subject or

body."
FIXED-IN: 5.17.2

M  +14   -0    messagecore/autotests/stringutiltest.cpp
M  +1    -0    messagecore/autotests/stringutiltest.h
M  +10   -5    messagecore/src/utils/stringutil.cpp

https://invent.kde.org/pim/messagelib/commit/6c4fd41ee3ffc5227f805d65091775d556486aef