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
F22617177: D20630.id.diff
Tue, Sep 29, 11:47 AM
Unknown Object (File)
Aug 22 2026, 5:18 PM
Unknown Object (File)
Aug 14 2026, 5:13 PM
Unknown Object (File)
Aug 12 2026, 3:35 PM
Unknown Object (File)
Aug 7 2026, 10:28 AM
Unknown Object (File)
Jul 11 2026, 11:11 PM
Unknown Object (File)
Jul 6 2026, 1:28 AM
Unknown Object (File)
Apr 21 2026, 8:01 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