diff options
author | Andres Rey <[email protected]> | 2017-11-30 23:57:12 +0000 |
---|---|---|
committer | Andres Rey <[email protected]> | 2017-11-30 23:57:12 +0000 |
commit | a5338a7ada6e5c029bc3e70200eb633a94b852d3 (patch) | |
tree | 525318de15854742d13ad7a362a20560f3a0c921 | |
parent | 35f81ed82beffcacbaa3e2937e90a8cf30b4f9ec (diff) |
Remove configuration setting from the __construct
-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()) { |