From 5f9bff0f71b415dd6e9753b7b7f1ad75db8aa481 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nicolas=20L=C5=93uillet?= Date: Thu, 8 Aug 2013 21:13:37 +0200 Subject: [PATCH] some urls weren't well parsed --- inc/3rdparty/Readability.php | 3 ++- inc/poche/Tools.class.php | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/inc/3rdparty/Readability.php b/inc/3rdparty/Readability.php index e1e8738b..7605871c 100644 --- a/inc/3rdparty/Readability.php +++ b/inc/3rdparty/Readability.php @@ -810,7 +810,8 @@ class Readability return $this->grabArticle($this->body); } else { - return false; + # this line was commented by Nicolas Lœuillet 8/8/13 due to some urls not parsed + // return false; } } return $articleContent; diff --git a/inc/poche/Tools.class.php b/inc/poche/Tools.class.php index d0e43166..4a72bae3 100644 --- a/inc/poche/Tools.class.php +++ b/inc/poche/Tools.class.php @@ -170,6 +170,7 @@ class Tools preg_match('#charset="?(.*)"#si', $meta[0], $encoding); # if charset is found set it otherwise, set it to utf-8 $html_charset = (!empty($encoding[1])) ? strtolower($encoding[1]) : 'utf-8'; + if (empty($encoding[1])) $encoding[1] = 'utf-8'; } else { $html_charset = 'utf-8'; $encoding[1] = ''; -- 2.41.0