From f085f421a62caac836cee3359cafb566e9cbc5ae Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sun, 18 Apr 2010 11:45:09 +0200 Subject: 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 --- src/webtab.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) 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(); -- cgit v1.2.1