aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/3rdparty/makefulltextfeedHelpers.php
diff options
context:
space:
mode:
authortcitworld <tcit@tcit.fr>2014-06-25 19:33:28 +0200
committertcitworld <tcit@tcit.fr>2014-06-25 19:33:28 +0200
commitcdda041a90657ea5bf87d04339ef88746caa0733 (patch)
tree3baad4dd24db18df642bda284a6a64ba7875b802 /inc/3rdparty/makefulltextfeedHelpers.php
parent69213014d1fb8f05cffe7bf83467d938a282f29b (diff)
parent692425342317277090f4c03f36d114eab3742340 (diff)
downloadwallabag-cdda041a90657ea5bf87d04339ef88746caa0733.tar.gz
wallabag-cdda041a90657ea5bf87d04339ef88746caa0733.tar.zst
wallabag-cdda041a90657ea5bf87d04339ef88746caa0733.zip
Merge pull request #737 from mariroz/dev
fix of issue #677: When downloading images, wallabag doesnt respect html "base" tag, tnx to @fivefilters
Diffstat (limited to 'inc/3rdparty/makefulltextfeedHelpers.php')
-rwxr-xr-xinc/3rdparty/makefulltextfeedHelpers.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/inc/3rdparty/makefulltextfeedHelpers.php b/inc/3rdparty/makefulltextfeedHelpers.php
index 4e985372..ac872ab8 100755
--- a/inc/3rdparty/makefulltextfeedHelpers.php
+++ b/inc/3rdparty/makefulltextfeedHelpers.php
@@ -377,3 +377,13 @@ function debug($msg) {
377 flush(); 377 flush();
378 } 378 }
379} 379}
380
381function get_base_url($dom) {
382 $xpath = new DOMXPath($dom);
383 $base_url = @$xpath->evaluate('string(//head/base/@href)', $dom);
384 if ($base_url !== '') {
385 return $base_url;
386 } else {
387 return false;
388 }
389}