Bug 97932

Summary: html special chars are not translated.
Product: [Applications] akregator Reporter: Stephen Leaf <smileaf>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:

Description Stephen Leaf 2005-01-26 15:23:48 UTC
Version:            (using KDE KDE 3.3.91)
Installed from:    Gentoo Packages
Compiler:          gcc 3.3.5 
OS:                Linux

in the listview html special chars are translated however in the detailed view these are displayed as the raw html

&amp;, &gt;, &lt;, etc

Examples of this can be found on the kde-look rss feed for Theme/Style for KDE > 3.2
Comment 1 Frank Osterfeld 2005-01-26 20:13:05 UTC
CVS commit by osterfeld: 

This works better than QStyleSheet::escape(). Although it would be better to solve all these problems by escaping and 
resolving entities appriopriately in the RSS parser instead of messing around with it in GUI classes.
BUG:97932


  M +1 -2      articleviewer.cpp   1.90


--- kdepim/akregator/src/articleviewer.cpp  #1.89:1.90
@@ -10,5 +10,4 @@
 #include <qpaintdevicemetrics.h>
 #include <qscrollview.h>
-#include <qstylesheet.h>
 #include <qvaluelist.h>
 
@@ -200,5 +199,5 @@ QString ArticleViewer::formatArticle(Fee
         if (article.link().isValid())
             text += "<a href=\""+article.link().url()+"\">";
-        text += QStyleSheet::escape(article.title()); // TODO: better leave things escaped in the parser
+        text += article.title().replace("<", "&lt;").replace(">", "&gt;"); // TODO: better leave things escaped in the parser
         if (article.link().isValid())
             text += "</a>";