[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/4.2/kdepim/akregator/src
From:       Frank Osterfeld <frank.osterfeld () kdemail ! net>
Date:       2009-01-25 18:02:34
Message-ID: 1232906554.384269.22106.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 916646 by osterfeld:

backport:

SVN commit 916644 by osterfeld: 

fix Complete Story link if the link contains an anchor. We must tell 
KHTMLPart that it shows the linked item to make relative links work, 
but that in turn breaks in the presence of an anchor (as KHTMLPart 
tries to simply jump to the anchor instead of opening the website).

Workaround: adding a bogus 
query item makes the two URLs different for the anchor check but 
keeps the relative link resolution working. 

CCBUG:177754
CCBUG:180789 


 M  +9 -1      articleviewer.cpp  


--- branches/KDE/4.2/kdepim/akregator/src/articleviewer.cpp #916645:916646
@@ -457,7 +457,15 @@
 
     head += "</style></head><body>";
     m_part->view()->setContentsPos(0,0);
-    m_part->begin(m_link);
+
+    //pass link to the KHTMLPart to make relative links work
+    //add a bogus query item to distinguish from m_link
+    //fixes the Complete Story link if the url has an anchor (e.g. #reqRSS) in it
+    //See bug 177754
+
+    KUrl url(m_link);
+    url.addQueryItem("akregatorPreviewMode", "true");
+    m_part->begin(url);
     m_part->write(head);
 }
 
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic