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
F18873165: D20630.diff
Wed, Nov 5, 8:19 AM
F18844445: D20630.diff
Wed, Oct 29, 5:31 AM
F18789235: D20630.diff
Wed, Oct 15, 8:40 AM
F18774384: D20630.id49226.diff
Fri, Oct 10, 4:30 AM
F18766225: D20630.id.diff
Tue, Oct 7, 3:39 PM
F18623437: D20630.diff
Sep 15 2025, 3:49 PM
F18618848: D20630.diff
Sep 15 2025, 1:06 AM
F18616504: D20630.id.diff
Sep 14 2025, 5:50 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