mirror of
https://github.com/j0k3r/php-readability.git
synced 2026-09-26 22:16:12 +00:00
Compare commits
2
Commits
67a2b07505
...
1.2.10
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5638357306 | ||
|
|
651e8a6bb0 |
+3
-4
@@ -137,10 +137,6 @@ class Readability implements LoggerAwareInterface
|
||||
protected $useTidy;
|
||||
// raw HTML 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
|
||||
'!</?span[^>]*>!is' => '',
|
||||
// HACK: firewall-filtered content
|
||||
@@ -397,6 +393,9 @@ class Readability implements LoggerAwareInterface
|
||||
|
||||
$this->logger->debug($this->lightClean ? 'Light clean enabled.' : 'Standard clean enabled.');
|
||||
|
||||
$this->clean($articleContent, 'style');
|
||||
$this->clean($articleContent, 'script');
|
||||
|
||||
$this->cleanStyles($articleContent);
|
||||
$this->killBreaks($articleContent);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user