mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-17 05:25:15 +02:00
fix various html parse errors
This commit is contained in:
parent
bef7a5d66b
commit
01164c8c2f
6 changed files with 42 additions and 15 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue