It would fail for e.g. `<div> <p>foo</p> </div>`.
mozilla/readability uses children for the tag lookup, which return only elements.
PHP does not have children property so b580cf216d
mistakenly used `childNodes` instead, but that can return any node type.
Let’s filter the children ourselves.
Also add comments from mozilla/readability’s `_hasSingleTagInsideElement`.
pull/87/head
parent
d2d7dcd476
commit
273a95ae9e
1 changed files with 13 additions and 6 deletions
Loading…
Reference in new issue