mirror of https://github.com/nextcloud/bookmarks
fix(CrawlService): Catch whatever Readability might throw at us
fixes #1965 Signed-off-by: Marcel Klehr <mklehr@gmx.net>
This commit is contained in:
parent
143ad37e1e
commit
15cb30d3cd
|
@ -123,8 +123,9 @@ class CrawlService {
|
|||
$readability = new Readability($config);
|
||||
try {
|
||||
$readability->parse($resp->getBody());
|
||||
} catch (ParseException $e) {
|
||||
} catch (\Throwable $e) {
|
||||
$this->logger->debug(get_class($e)." ".$e->getMessage()."\r\n".$e->getTraceAsString());
|
||||
return;
|
||||
}
|
||||
$bookmark->setHtmlContent($readability->getContent());
|
||||
$bookmark->setTextContent(strip_tags($readability->getContent()));
|
||||
|
|
Loading…
Reference in New Issue