summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2010-04-18 11:45:09 +0200
committerAndrea Diamantini <adjam7@gmail.com>2010-04-18 11:45:09 +0200
commitf085f421a62caac836cee3359cafb566e9cbc5ae (patch)
tree1192b765c35575f6248851c1d126d2a2651b8250 /src
parentrekonq 0.4.61 (diff)
downloadrekonq-f085f421a62caac836cee3359cafb566e9cbc5ae.tar.xz
RSS relative url fixing.
This patch solves bug #234579 and is heavily based on the one provided by Thomas Fryda in its bug report. Thanks :) BUG: 234579
Diffstat (limited to 'src')
-rw-r--r--src/webtab.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/webtab.cpp b/src/webtab.cpp
index fd44cc10..8af1055c 100644
--- a/src/webtab.cpp
+++ b/src/webtab.cpp
@@ -184,7 +184,20 @@ bool WebTab::hasRSSInfo()
foreach(QWebElement el, col)
{
if( el.attribute("type") == QL1S("application/rss+xml") || el.attribute("type") == QL1S("application/rss+xml") )
- _rssList << KUrl( el.attribute("href") );
+ {
+ KUrl u = KUrl( el.attribute("href") );
+ if(u.isRelative())
+ {
+ u = url();
+ // NOTE
+ // cd() is probably better than setPath() here,
+ // for all those url sites just having a path
+ if(u.cd( el.attribute("href") ))
+ _rssList << u;
+ }
+ else
+ _rssList << u;
+ }
}
return !_rssList.isEmpty();