Bug 57423

Summary: HTML entities sequences in links are rendered unnecessarily.
Product: [Applications] kmail Reporter: Paul Gargan <pgargan>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 1.4.3   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:

Description Paul Gargan 2003-04-18 16:51:52 UTC
Version:           1.4.3 (using KDE 3.0.3)
Installed from:    SuSE
Compiler:          gcc version 2.95.3 20010315 (SuSE)
OS:          Linux (i686) release 2.4.10-4GB

I'm using KMail 1.4.3 on KDE 3.0.3. As per normal, strings such as http://example.com and whatever@example.com are rendered as clickable links when viewing mail. I've disabled HTML mail. 

However, HTML entities in these links, such as &pi, are rendered. http://example.com/math.pl?e=2.7182&pi=3.1412 causes the &pi sequence of characters to display a literal PI symbol. The correct URL is still invoked when such a link is clicked.
Comment 1 Stephan Kulow 2003-09-27 21:37:30 UTC
Subject: kdepim/libkdenetwork

CVS commit by coolo: 

escape & in rendered links
CCMAIL: 57423-close@bugs.kde.org


  M +1 -0      linklocator.cpp   1.2


--- kdepim/libkdenetwork/linklocator.cpp  #1.1:1.2
@@ -265,4 +265,5 @@ QString LinkLocator::convertToHtml(const
           hyperlink = str;
 
+        str = str.replace('&', "&amp;");
         result += "<a href=\"" + hyperlink + "\">" + str + "</a>";
         x += locator.mPos - start;