From 01164c8c2f802f0b4c2f0f7c4a83ed826768ae1a Mon Sep 17 00:00:00 2001 From: Friendika Date: Thu, 20 Oct 2011 16:48:07 -0700 Subject: fix various html parse errors --- mod/parse_url.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'mod/parse_url.php') diff --git a/mod/parse_url.php b/mod/parse_url.php index a238ecb2f..7a520ba92 100644 --- a/mod/parse_url.php +++ b/mod/parse_url.php @@ -88,9 +88,11 @@ function parse_url_content(&$a) { $purifier = new HTMLPurifier($config); $s = $purifier->purify($s); -// logger('parse_url: purified: ' . $s, LOGGER_DATA); - - $dom = @HTML5_Parser::parse($s); + try { + $dom = HTML5_Parser::parse($s); + } catch (DOMException $e) { + logger('scrape_dfrn: parse error: ' . $e); + } if(! $dom) { echo sprintf($template,$url,$url,'') . $str_tags; -- cgit v1.2.3