mirror of
https://github.com/YGGverse/YGGo.git
synced 2025-01-24 13:34:25 +00:00
fix DomDocument initiation without encoding provided
This commit is contained in:
parent
fcda6b9885
commit
1d5d5ead5d
@ -496,7 +496,7 @@ foreach ($db->getHostPageCrawlQueue(CRAWL_PAGE_LIMIT, time() - CRAWL_PAGE_SECOND
|
||||
// Parse content
|
||||
$dom = new DomDocument();
|
||||
|
||||
@$dom->loadHTML($content);
|
||||
@$dom->loadHTML(sprintf('<?xml encoding="%s" ?>', mb_detect_encoding($content)) . $content);
|
||||
|
||||
// Skip index page links without titles
|
||||
$title = @$dom->getElementsByTagName('title');
|
||||
|
Loading…
x
Reference in New Issue
Block a user