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
F19120820: D20630.id49211.diff
Dec 9 2025, 9:56 PM
F19020055: D20630.id.diff
Nov 23 2025, 4:54 PM
F18873165: D20630.diff
Nov 5 2025, 8:19 AM
F18844445: D20630.diff
Oct 29 2025, 5:31 AM
F18789235: D20630.diff
Oct 15 2025, 8:40 AM
F18774384: D20630.id49226.diff
Oct 10 2025, 4:30 AM
F18766225: D20630.id.diff
Oct 7 2025, 3:39 PM
F18623437: D20630.diff
Sep 15 2025, 3:49 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