aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-10-20 16:48:07 -0700
committerFriendika <info@friendika.com>2011-10-20 16:48:07 -0700
commit01164c8c2f802f0b4c2f0f7c4a83ed826768ae1a (patch)
tree32b0ba9fc9c46057a44dfb97691fd548399c5520 /mod
parentbef7a5d66bf7ef26e0d4da1c6209f3e23b0ccffe (diff)
downloadvolse-hubzilla-01164c8c2f802f0b4c2f0f7c4a83ed826768ae1a.tar.gz
volse-hubzilla-01164c8c2f802f0b4c2f0f7c4a83ed826768ae1a.tar.bz2
volse-hubzilla-01164c8c2f802f0b4c2f0f7c4a83ed826768ae1a.zip
fix various html parse errors
Diffstat (limited to 'mod')
-rw-r--r--mod/parse_url.php8
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;