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
F19909872: D20631.diff
Thu, Apr 2, 2:54 AM
F19909868: D20631.diff
Thu, Apr 2, 2:54 AM
F19908915: D20631.diff
Wed, Apr 1, 10:43 PM
F19908914: D20631.diff
Wed, Apr 1, 10:43 PM
F19856498: D20631.diff
Mar 13 2026, 9:11 PM
F19856497: D20631.diff
Mar 13 2026, 9:11 PM
F19856495: D20631.diff
Mar 13 2026, 9:06 PM
F19709474: D20631.diff
Feb 11 2026, 2:50 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