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
F17869629: D20631.diff
Mon, Jul 28, 11:52 AM
Unknown Object (File)
Jun 5 2025, 6:03 PM
Unknown Object (File)
Jun 4 2025, 6:32 AM
Unknown Object (File)
Jun 2 2025, 9:07 PM
Unknown Object (File)
Jun 2 2025, 9:07 PM
Unknown Object (File)
May 7 2025, 8:31 PM
Unknown Object (File)
May 1 2025, 12:17 PM
Unknown Object (File)
Apr 17 2025, 6:37 AM
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