forked from wallabag/wallabag
fix of issue #677: When downloading images, wallabag doesnt respect html "base" tag, tnx to @fivefilters
This commit is contained in:
10
inc/3rdparty/makefulltextfeedHelpers.php
vendored
10
inc/3rdparty/makefulltextfeedHelpers.php
vendored
@ -377,3 +377,13 @@ function debug($msg) {
|
||||
flush();
|
||||
}
|
||||
}
|
||||
|
||||
function get_base_url($dom) {
|
||||
$xpath = new DOMXPath($dom);
|
||||
$base_url = @$xpath->evaluate('string(//head/base/@href)', $dom);
|
||||
if ($base_url !== '') {
|
||||
return $base_url;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user