git.cweiske.de
/
phorkie.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2b8fb51
)
Manually activate libxml external entity resolver
author
Christian Weiske
<cweiske@cweiske.de>
Tue, 29 Aug 2017 19:38:15 +0000
(21:38 +0200)
committer
Christian Weiske
<cweiske@cweiske.de>
Tue, 29 Aug 2017 19:38:15 +0000
(21:38 +0200)
so that we are able to load remote URLs with DOMDocument
Resolves: https://github.com/cweiske/phorkie/issues/26
src/phorkie/HtmlParser.php
patch
|
blob
|
history
diff --git
a/src/phorkie/HtmlParser.php
b/src/phorkie/HtmlParser.php
index 38d8af858206627cc15b78e2c680b2ef3a72b225..257dfe14e6f8a7bda71a5b2d3e384c4a515b8d4d 100644
(file)
--- a/
src/phorkie/HtmlParser.php
+++ b/
src/phorkie/HtmlParser.php
@@
-174,6
+174,8
@@
class HtmlParser
public function getHtmlTitle($url)
{
libxml_use_internal_errors(true);
+ //allow loading URLs in DOMDocument
+ libxml_disable_entity_loader(false);
$doc = \DOMDocument::loadHTMLFile($url);
if ($doc === false) {
return null;