[kmail2] [Bug 366981] Mailto URL does not allows a body with line breaks

Bernhard Scheirle via KDE Bugzilla bugzilla_noreply at kde.org
Thu Aug 18 07:36:19 BST 2016


https://bugs.kde.org/show_bug.cgi?id=366981

Bernhard Scheirle <bernhard+kde at scheirle.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bernhard+kde at scheirle.de

--- Comment #3 from Bernhard Scheirle <bernhard+kde at scheirle.de> ---
I'm also affected by this bug.

I think I found the cause for this, and if so it should be easy to fix.

KMail uses MessageCore::StringUtil::parseMailtoUrl[1] to parse url query
parameters.
In parseMailtoUrl it uses QUrlQuery::queryItems() to get the list of
parameters.
By default queryItems does not decode all "%" elements.[2]

So using QUrlQuery::queryItems(QUrl::FullyDecoded) instead should fix this.

I think the explicit "%0A" to "\n" transformation in Lines 197-202 would than
be obsolete as well. [1]
Especially since mailto urls must have "%0D%0A" and not "%0A" line breaks.  [3]

[1] Line 185:
https://quickgit.kde.org/?p=messagelib.git&a=blob&h=41d01b75b9058281ac9f5bdd4e4abea0c34b309a&hb=0c5e64ed193141edd63de7eb01a10e6d353e1856&f=messagecore%2Fsrc%2Futils%2Fstringutil.cpp
[2] http://doc.qt.io/qt-5/qurl.html#ComponentFormattingOption-enum
[3] RFC2368 Section 5: http://www.ietf.org/rfc/rfc2368.txt

-- 
You are receiving this mail because:
You are the assignee for the bug.



More information about the Kdepim-bugs mailing list