@ -108,10 +108,6 @@ class Readability implements LoggerAwareInterface
protected $useTidy;
protected $useTidy;
// raw HTML filters
// raw HTML filters
protected $pre_filters = [
protected $pre_filters = [
// remove obvious scripts
'!< script [ ^ > ] * > ( . * ? ) < / script > !is' => '',
// remove obvious styles
'!< style [ ^ > ] * > ( . * ? ) < / style > !is' => '',
// remove spans as we redefine styles and they're probably special-styled
// remove spans as we redefine styles and they're probably special-styled
'!< /?span[^>]*>!is' => '',
'!< /?span[^>]*>!is' => '',
// HACK: firewall-filtered content
// HACK: firewall-filtered content
@ -366,6 +362,9 @@ class Readability implements LoggerAwareInterface
$this->logger->debug($this->lightClean ? 'Light clean enabled.' : 'Standard clean enabled.');
$this->logger->debug($this->lightClean ? 'Light clean enabled.' : 'Standard clean enabled.');
$this->clean($articleContent, 'style');
$this->clean($articleContent, 'script');
$this->cleanStyles($articleContent);
$this->cleanStyles($articleContent);
$this->killBreaks($articleContent);
$this->killBreaks($articleContent);