Bug 105210 - Imported feed URLs are not HTML-decoded
Summary: Imported feed URLs are not HTML-decoded
Status: RESOLVED FIXED
Alias: None
Product: akregator
Classification: Applications
Component: akregator konqueror plugin (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 107641 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-05-06 21:51 UTC by Michael Driscoll
Modified: 2005-06-28 21:29 UTC (History)
1 user (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 Michael Driscoll 2005-05-06 21:51:58 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc 3.4.4 Debian/unstable gcc-3.4 3.4.3-12.1
OS:                Linux

From a CVS(sic) checkout of around 20050501...

Browse to http://www.derkarl.org/cvscommits.html .  Page contains the following:

<link rel='alternate' title='KDE CVS Commits RSS' href='http://www.derkarl.org/kcvscommits.rdf.phtml?descriptionfilter=yes&amp;descriptions=yes' type='application/rss+xml' />

Click the RSS import button, feed will be imported as:

http://www.derkarl.org/kcvscommits.rdf.phtml?descriptionfilter=yes&amp;descriptions=yes
instead of
http://www.derkarl.org/kcvscommits.rdf.phtml?descriptionfilter=yes&descriptions=yes

which means that the &descriptions=yes was not enabled.  After editing the feed by hand and change the &amp; -> & then the feed operated correctly.

In case this bug text gets mangled somewhere along the way, the problem is that the entity <ampersand-"amp"-semicolon> was not decoded to <ampersand> when importing the feed.
Comment 1 Eckhart Wörner 2005-05-06 22:03:35 UTC
Confirmed for KDE 3.4 and SVN HEAD ( ah, SVN ;-) ).
Comment 2 Teemu Rytilahti 2005-05-12 23:01:52 UTC
Has been on my TODO for a while.. Hopefully I have some time in weekend to smash this one.
Comment 3 Heinrich Wendel 2005-06-23 20:41:21 UTC
*** Bug 107641 has been marked as a duplicate of this bug. ***
Comment 4 Heinrich Wendel 2005-06-28 21:29:14 UTC
SVN commit 429759 by lanius:

decode imported html feeds
BUG: 105210

 M  +7 -0      feeddetector.cpp  


--- trunk/KDE/kdeaddons/konq-plugins/akregator/feeddetector.cpp #429758:429759
@@ -26,6 +26,7 @@
 #include <qstring.h>
 #include <qstringlist.h>
 #include <qvaluelist.h>
+#include <kcharsets.h>
 
 #include "feeddetector.h"
 
@@ -87,6 +88,8 @@
         if (pos != -1)
             url = reHref.cap(1);
 
+        url = KCharsets::resolveEntities(url);
+
         // if feed has no title, use the url as preliminary title (until feed is parsed)
         if ( title.isEmpty() )
             title = url;
@@ -95,6 +98,7 @@
             list.append(FeedDetectorEntry(url, title) );		
     }
 
+
     return list;
 }
 
@@ -125,6 +129,9 @@
             if ( hrefpos != -1 )
             {
                 QString url = reHref.cap(1);
+
+                url = KCharsets::resolveEntities(url);
+
                 if ( rssrdfxml.exactMatch(url) )
                     list.append(url);
             }