Page MenuHomePhabricator

Fix some remarkup issues with selective construction of child nodes after HTML DOM parsing
ClosedPublic

Authored by epriestley on Jul 2 2019, 12:04 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 20, 3:51 PM
Unknown Object (File)
Thu, Dec 12, 2:13 AM
Unknown Object (File)
Wed, Dec 11, 7:14 PM
Unknown Object (File)
Sun, Dec 8, 5:46 PM
Unknown Object (File)
Nov 28 2024, 2:17 AM
Unknown Object (File)
Nov 20 2024, 1:51 AM
Unknown Object (File)
Nov 16 2024, 2:30 PM
Unknown Object (File)
Nov 12 2024, 3:05 PM
Subscribers
None

Details

Summary

See https://discourse.phabricator-community.org/t/bug-in-src-parser-html-phutildomnode-php/2882/.

The behavior of selectChildrenWithTags(...) currently isn't well-covered by tests and isn't quite right. Add coverage and fix it up.

Particularly, there's a bad call to a nonexistent method, and when we convert a tag that doesn't match the selection set into content, we incorrectly discard any paired closing tag.

Test Plan

Added failing tests, made them pass.

Diff Detail

Repository
rPHU libphutil
Lint
Lint Not Applicable
Unit
Tests Not Applicable