Page MenuHomePhabricator

When parsing HTML in remarkup, always start a new tag when encountering "<"
ClosedPublic

Authored by epriestley on Jul 2 2019, 12:11 AM.
Tags
None
Referenced Files
F18870743: D20631.id.diff
Tue, Nov 4, 6:44 PM
F18863141: D20631.diff
Sun, Nov 2, 10:08 PM
F18761860: D20631.id.diff
Oct 6 2025, 4:33 PM
F18759623: D20631.id49212.diff
Oct 6 2025, 4:51 AM
F18732305: D20631.diff
Sep 30 2025, 5:29 PM
F18653182: D20631.id49227.diff
Sep 21 2025, 11:31 AM
F18630216: D20631.diff
Sep 16 2025, 11:03 AM
F18221596: D20631.id.diff
Aug 19 2025, 6:28 PM
Subscribers
None

Details

Summary

Depends on D20630. See https://discourse.phabricator-community.org/t/bug-in-src-parser-html-phutildomnode-php/2882/. Currently, we parse <x>1<2</x> as an <x> tag containing a <2</x> tag.

A more expected interpretation of this is a single <x> tag containing the content 1<2.

When we encounter a <, always start a new tag, even if we're currently in a tag.

Test Plan

Added a test and made it pass.

Diff Detail

Repository
rPHU libphutil
Lint
Lint Not Applicable
Unit
Tests Not Applicable