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
F14044123: D20630.diff
Tue, Nov 12, 3:05 PM
F14035352: D20630.id49211.diff
Sun, Nov 10, 5:35 AM
F14026045: D20630.diff
Thu, Nov 7, 10:39 PM
F14002140: D20630.diff
Fri, Oct 25, 3:36 PM
F13959221: D20630.id.diff
Oct 14 2024, 6:20 PM
Unknown Object (File)
Oct 12 2024, 7:29 PM
Unknown Object (File)
Oct 12 2024, 6:14 PM
Unknown Object (File)
Oct 12 2024, 12:07 AM
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
Branch
html1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 23080
Build 31686: Run Core Tests
Build 31685: arc lint + arc unit