]> git.wh0rd.org Git - tt-rss.git/commitdiff
properly handle relative link elements for feed and articles (closes #358)
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Mon, 1 Aug 2011 09:06:25 +0000 (13:06 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Mon, 1 Aug 2011 09:06:25 +0000 (13:06 +0400)
functions.php

index 0707960da42df0d4dcaecef624e0cd3dd4dc68b0..21693c5002ec51bed17b9e47d01d25e2509e1043 100644 (file)
                                $site_url = $rss->channel["link"];
                        }
 
+                       $site_url = rewrite_relative_url($fetch_url, $site_url);
+
                        if ($debug_enabled) {
                                _debug("update_rss_feed: checking favicon...");
                        }
                                        if (!$entry_link) $entry_link = $item["link"];
                                }
 
+                               $entry_link = rewrite_relative_url($site_url, $entry_link);
+
                                if ($debug_enabled) {
                                        _debug("update_rss_feed: title $entry_title");
+                                       _debug("update_rss_feed: link $entry_link");
                                }
 
                                if (!$entry_title) $entry_title = date("Y-m-d H:i:s", $entry_timestamp);;