git.cweiske.de
/
phinde.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
support base href
[phinde.git]
/
src
/
phinde
/
LinkExtractor
/
Html.php
diff --git
a/src/phinde/LinkExtractor/Html.php
b/src/phinde/LinkExtractor/Html.php
index a6fa8efef8fe9725722bf94bbd137671b73e3afe..7b987e3280fa0b298c7c0f9b2ef774eb15cc5a87 100644
(file)
--- a/
src/phinde/LinkExtractor/Html.php
+++ b/
src/phinde/LinkExtractor/Html.php
@@
-22,6
+22,13
@@
class Html
$dx = new \DOMXPath($doc);
$dx = new \DOMXPath($doc);
+ $xbase = $dx->evaluate('/html/head/base[@href]')->item(0);
+ if ($xbase) {
+ $base = $base->resolve(
+ $xbase->attributes->getNamedItem('href')->textContent
+ );
+ }
+
$meta = $dx->evaluate('/html/head/meta[@name="robots" and @content]')
->item(0);
if ($meta) {
$meta = $dx->evaluate('/html/head/meta[@name="robots" and @content]')
->item(0);
if ($meta) {