X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=inc%2F3rdparty%2Fmakefulltextfeed.php;h=27a62d7324890d474dea4cead9bc5c451c45ec32;hb=10939766de3b6fb677e8acdd74220ad2da612a26;hp=62c050ec2bc368fd63fd265da8bfa1b888453782;hpb=35d4e27588d3e7a6ace1f6b101d909f1eceafac9;p=github%2Fwallabag%2Fwallabag.git diff --git a/inc/3rdparty/makefulltextfeed.php b/inc/3rdparty/makefulltextfeed.php index 62c050ec..27a62d73 100755 --- a/inc/3rdparty/makefulltextfeed.php +++ b/inc/3rdparty/makefulltextfeed.php @@ -31,6 +31,8 @@ along with this program. If not, see . //error_reporting(E_ALL ^ E_NOTICE); ini_set("display_errors", 1); @set_time_limit(120); +libxml_use_internal_errors(true); + // Deal with magic quotes if (get_magic_quotes_gpc()) { @@ -671,7 +673,11 @@ foreach ($items as $key => $item) { $html .= $item->get_description(); } else { $readability->clean($content_block, 'select'); - if ($options->rewrite_relative_urls) makeAbsolute($effective_url, $content_block); + // get base URL + $base_url = get_base_url($readability->dom); + if (!$base_url) $base_url = $effective_url; + // rewrite URLs + if ($options->rewrite_relative_urls) makeAbsolute($base_url, $content_block); // footnotes if (($links == 'footnotes') && (strpos($effective_url, 'wikipedia.org') === false)) { $readability->addFootnotes($content_block);