} else {
$sx = simplexml_import_dom(\DOMDocument::loadHTML($html));
}
+ //FIXME: handle network error
$elems = $sx->xpath('//*[@rel="vcs-git"]');
$titles = $sx->xpath('/html/head/title');
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;