aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/poche/Url.class.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas.loeuillet@gmail.com>2013-08-22 23:09:46 -0700
committerNicolas LÅ“uillet <nicolas.loeuillet@gmail.com>2013-08-22 23:09:46 -0700
commit64fa45e262d24f75740b0df267bb2fc4cdf83fa2 (patch)
tree43fbcf6eac2fc1a913c796a5631a7ba874af9693 /inc/poche/Url.class.php
parent746f93c290881d97997b8179395de2875eb57c71 (diff)
parent57c91e427d20d520bc506bef52189a86d72a9255 (diff)
downloadwallabag-64fa45e262d24f75740b0df267bb2fc4cdf83fa2.tar.gz
wallabag-64fa45e262d24f75740b0df267bb2fc4cdf83fa2.tar.zst
wallabag-64fa45e262d24f75740b0df267bb2fc4cdf83fa2.zip
Merge pull request #154 from nicofrand/dev
poche won't import the content of some articles
Diffstat (limited to 'inc/poche/Url.class.php')
-rw-r--r--inc/poche/Url.class.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/inc/poche/Url.class.php b/inc/poche/Url.class.php
index 00b0b257..77ed5398 100644
--- a/inc/poche/Url.class.php
+++ b/inc/poche/Url.class.php
@@ -64,8 +64,15 @@ class Url
64 if (function_exists('tidy_parse_string')) { 64 if (function_exists('tidy_parse_string')) {
65 $tidy = tidy_parse_string($html, array(), 'UTF8'); 65 $tidy = tidy_parse_string($html, array(), 'UTF8');
66 $tidy->cleanRepair(); 66 $tidy->cleanRepair();
67 $html = $tidy->value; 67
68 } 68 //Warning: tidy might fail so, ensure there is still a content
69 $body = $tidy->body();
70
71 //hasChildren does not seem to work, just check the string
72 //returned (and do not forget to clean the white spaces)
73 if (preg_replace('/\s+/', '', $body->value) !== "<body></body>")
74 $html = $tidy->value;
75 }
69 76
70 $parameters = array(); 77 $parameters = array();
71 if (isset($html) and strlen($html) > 0) 78 if (isset($html) and strlen($html) > 0)