Moving the clean up code to a central place.
This commit is contained in:
parent
620ee6be0b
commit
04106ff6f5
2 changed files with 6 additions and 5 deletions
|
@ -263,11 +263,6 @@ function scrape_feed($url) {
|
|||
}
|
||||
|
||||
try {
|
||||
// Cleanup invalid HTML
|
||||
$doc = new DOMDocument();
|
||||
@$doc->loadHTML($s);
|
||||
$s = $doc->saveHTML();
|
||||
|
||||
$dom = HTML5_Parser::parse($s);
|
||||
} catch (DOMException $e) {
|
||||
logger('scrape_feed: parse error: ' . $e);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue