mirror of
https://github.com/j0k3r/php-readability.git
synced 2026-09-27 06:26:17 +00:00
Clean empty figure tags without ending
See 'Tag omission' https://developer.mozilla.org/en-US/docs/Web/HTML/Element/figure Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
This commit is contained in:
+1
-1
@@ -157,7 +157,7 @@ class Readability implements LoggerAwareInterface
|
||||
// replace excessive br's
|
||||
'/<br\s*\/?>\s*<p/i' => '<p',
|
||||
// replace empty tags that break layouts
|
||||
'!<(?:a|div|p)[^>]+/>!is' => '',
|
||||
'!<(?:a|div|p|figure)[^>]+/>!is' => '',
|
||||
// remove all attributes on text tags
|
||||
//'!<(\s*/?\s*(?:blockquote|br|hr|code|div|article|span|footer|aside|p|pre|dl|li|ul|ol)) [^>]+>!is' => "<\\1>",
|
||||
//single newlines cleanup
|
||||
|
||||
Reference in New Issue
Block a user