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

tabs2spaces

This commit is contained in:
Nicolas Lœuillet 2013-08-23 21:07:32 +02:00
parent ffc966d72f
commit 70c39d1618

View File

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