]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
some urls weren't well parsed
authorNicolas Lœuillet <nicolas.loeuillet@gmail.com>
Thu, 8 Aug 2013 19:13:37 +0000 (21:13 +0200)
committerNicolas Lœuillet <nicolas.loeuillet@gmail.com>
Thu, 8 Aug 2013 19:13:37 +0000 (21:13 +0200)
inc/3rdparty/Readability.php
inc/poche/Tools.class.php

index e1e8738b8e149e8f3bd26c6830fb36630a098aa5..7605871cc4d1fa70643d3a0cf2d7e4ebd7ac3023 100644 (file)
@@ -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;
index d0e431663dcf5f9dc07aa1e904edf78bfe789cb7..4a72bae3defb9b252da525ab675b6abdd8b0c282 100644 (file)
@@ -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] = '';