Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix hasSingleTagInsideElement method
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 b580cf2 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`.
- Loading branch information