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>
pull/66/head
Kevin Decherf 4 years ago
parent d5330a9c28
commit eb72a315c4
  1. 2
      src/Readability.php

@ -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

Loading…
Cancel
Save