aboutsummaryrefslogtreecommitdiffstats
path: root/include/Scrape.php
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 /include/Scrape.php
parentbef7a5d66bf7ef26e0d4da1c6209f3e23b0ccffe (diff)
downloadvolse-hubzilla-01164c8c2f802f0b4c2f0f7c4a83ed826768ae1a.tar.gz
volse-hubzilla-01164c8c2f802f0b4c2f0f7c4a83ed826768ae1a.tar.bz2
volse-hubzilla-01164c8c2f802f0b4c2f0f7c4a83ed826768ae1a.zip
fix various html parse errors
Diffstat (limited to 'include/Scrape.php')
-rw-r--r--include/Scrape.php27
1 files changed, 20 insertions, 7 deletions
diff --git a/include/Scrape.php b/include/Scrape.php
index 642b8e624..f5b15c82f 100644
--- a/include/Scrape.php
+++ b/include/Scrape.php
@@ -30,8 +30,11 @@ function scrape_dfrn($url) {
}
}
-
- $dom = HTML5_Parser::parse($s);
+ try {
+ $dom = HTML5_Parser::parse($s);
+ } catch (DOMException $e) {
+ logger('scrape_dfrn: parse error: ' . $e);
+ }
if(! $dom)
return $ret;
@@ -132,9 +135,11 @@ function scrape_meta($url) {
}
}
-
-
- $dom = HTML5_Parser::parse($s);
+ try {
+ $dom = HTML5_Parser::parse($s);
+ } catch (DOMException $e) {
+ logger('scrape_meta: parse error: ' . $e);
+ }
if(! $dom)
return $ret;
@@ -177,7 +182,11 @@ function scrape_vcard($url) {
}
}
- $dom = HTML5_Parser::parse($s);
+ try {
+ $dom = HTML5_Parser::parse($s);
+ } catch (DOMException $e) {
+ logger('scrape_vcard: parse error: ' . $e);
+ }
if(! $dom)
return $ret;
@@ -243,7 +252,11 @@ function scrape_feed($url) {
}
}
- $dom = HTML5_Parser::parse($s);
+ try {
+ $dom = HTML5_Parser::parse($s);
+ } catch (DOMException $e) {
+ logger('scrape_feed: parse error: ' . $e);
+ }
if(! $dom)
return $ret;