diff --git a/resources/text/CHANGELOG b/resources/text/CHANGELOG index d97b654b8..0def609a7 100755 --- a/resources/text/CHANGELOG +++ b/resources/text/CHANGELOG @@ -14,6 +14,7 @@ Added: Fixed: +▪ Standard RSS/RDF/ATOM relative URLs in entries should now be correctly loaded. (bug #160) ▪ Fixed some problems when adding feeds from external web browser like Firefox. (bug #135) ▪ Fixed problem where custom HTTP timeout setting was ignored for TT-RSS account. (GitHub bug #9) ▪ Fixed problems with master update mutex locking. (bug #153) diff --git a/src/services/standard/standardfeed.cpp b/src/services/standard/standardfeed.cpp index d307fb728..84a91f226 100755 --- a/src/services/standard/standardfeed.cpp +++ b/src/services/standard/standardfeed.cpp @@ -650,12 +650,11 @@ int StandardFeed::updateMessages(const QList &messages) { foreach (Message message, messages) { // Check if messages contain relative URLs and if they do, then replace them. if (message.m_url.startsWith(QL1S("/"))) { - QString new_message_url = url(); - int last_slash = new_message_url.lastIndexOf(QL1S("/")); - - if (last_slash >= 0) { - new_message_url = new_message_url.left(last_slash); - } + QString new_message_url = QUrl(url()).toString(QUrl::RemoveUserInfo | + QUrl::RemovePath | + QUrl::RemoveQuery | + QUrl::RemoveFilename | + QUrl::StripTrailingSlash); new_message_url += message.m_url; message.m_url = new_message_url;