diff options
author | Friendika <info@friendika.com> | 2011-10-20 16:48:07 -0700 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-10-20 16:48:07 -0700 |
commit | 01164c8c2f802f0b4c2f0f7c4a83ed826768ae1a (patch) | |
tree | 32b0ba9fc9c46057a44dfb97691fd548399c5520 /mod/parse_url.php | |
parent | bef7a5d66bf7ef26e0d4da1c6209f3e23b0ccffe (diff) | |
download | volse-hubzilla-01164c8c2f802f0b4c2f0f7c4a83ed826768ae1a.tar.gz volse-hubzilla-01164c8c2f802f0b4c2f0f7c4a83ed826768ae1a.tar.bz2 volse-hubzilla-01164c8c2f802f0b4c2f0f7c4a83ed826768ae1a.zip |
fix various html parse errors
Diffstat (limited to 'mod/parse_url.php')
-rw-r--r-- | mod/parse_url.php | 8 |
1 files changed, 5 insertions, 3 deletions
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; |