Bug 211128 - plain text emails should not replace ampersand & with &
Summary: plain text emails should not replace ampersand & with &
Status: RESOLVED FIXED
Alias: None
Product: kdepimlibs
Classification: Applications
Component: kpimutils (show other bugs)
Version: 4.4
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-19 21:49 UTC by Brian DeRocher
Modified: 2010-02-05 12:21 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brian DeRocher 2009-10-19 21:49:42 UTC
Version:            (using KDE 4.3.2)
OS:                Linux
Installed from:    Debian testing/unstable Packages

Looks like Kmail is changing & to & in plain text emails.  The link is clickable and the correct URL is use (the one with &).  But i need to cut and paste this URL into Firefox.  The displayed version shows &amps;.  If you put & in the location bar, the query string parameters are not separated correctly.

Content-Type: text/plain;
  charset=UTF-8

View source has:

https://green-site/?Ticket=85&Page=next

But the URL that is displays is:

https://green-site/?Ticket=85&Page=next

Viewing the source code a little, it seems odd to me that a function called ObjectTreeParser::processTextPlainSubtype(...) is calling quoteHtmlChars() which does this:

case '&':
        result += "&";
Comment 1 Tristan Miller 2009-10-28 15:49:10 UTC
This problem also occurs in KNode.  Is this some library bug then?
Comment 2 Arkadiusz Miskiewicz 2010-01-21 10:18:01 UTC
I can confirm that 4.4RC2 kmail is also affected. It changed URL:

https://sourceforge.net/tracker/?func=detail&atid=377408&aid=2936156&group_id=23067

to

https://sourceforge.net/tracker/?func=detail&atid=377408&aid=2936156&group_id=23067

when displaying email content.
Comment 3 Arkadiusz Miskiewicz 2010-01-31 12:02:20 UTC
knode from 4.4rc2 is also affected
Comment 4 Thomas McGuire 2010-02-05 11:07:00 UTC
This sounds like a bug in KPIMUtils::LinkLocator to me.
Comment 5 Torgny Nyblom 2010-02-05 12:21:23 UTC
SVN commit 1085498 by tnyblom:

Don't double escape "&".

BUG: 211128


 M  +0 -1      linklocator.cpp  
 M  +4 -0      tests/testlinklocator.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1085498