diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Readability.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Readability.php b/src/Readability.php index c42e577..b149f96 100644 --- a/src/Readability.php +++ b/src/Readability.php @@ -110,9 +110,6 @@ class Readability public function __construct(Configuration $configuration) { $this->configuration = $configuration; - - // To avoid having a gazillion of errors on malformed HTMLs - libxml_use_internal_errors(true); } /** @@ -201,6 +198,9 @@ class Readability */ private function loadHTML($html) { + // To avoid having a gazillion of errors on malformed HTMLs + libxml_use_internal_errors(true); + $dom = new DOMDocument('1.0', 'utf-8'); if (!$this->configuration->getSubstituteEntities()) { |