1
0
mirror of https://github.com/moparisthebest/wallabag synced 2024-11-23 17:42:15 -05:00

Merge pull request #154 from nicofrand/dev

poche won't import the content of some articles
This commit is contained in:
Nicolas Lœuillet 2013-08-22 23:09:46 -07:00
commit 64fa45e262

View File

@ -64,6 +64,13 @@ class Url
if (function_exists('tidy_parse_string')) {
$tidy = tidy_parse_string($html, array(), 'UTF8');
$tidy->cleanRepair();
//Warning: tidy might fail so, ensure there is still a content
$body = $tidy->body();
//hasChildren does not seem to work, just check the string
//returned (and do not forget to clean the white spaces)
if (preg_replace('/\s+/', '', $body->value) !== "<body></body>")
$html = $tidy->value;
}