Page MenuHomePhabricator

HTML element-like stuff are expanded then broken
Closed, ResolvedPublic

Description

Try round tripping the following text:

<x y>

<x.y>

<x-y>


Version: unspecified
Severity: normal

Details

Reference
bz41227

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:03 AM
bzimport added a project: Parsoid.
bzimport set Reference to bz41227.

I think I fixed this recently (if you ignore the syntactic diff on the attribute):

echo -e '<x y>\n\n<x.y>\n\n<x-y>' | nodejs parse --wt2wt
<x y=''>

<x.y>

<x-y>

I don't accept this resolution. "HTML element-like stuff" means they're not HTML by author's original idea. For example:

Here are three inequalities:

1>2

x<y

a>b

These examples are now fixed with https://gerrit.wikimedia.org/r/#/c/34569/, and I added a parser test case in https://gerrit.wikimedia.org/r/#/c/34592/.

There is still a minor issue in the HTML output for

x<y

a>b

Parsoid wraps this in a single paragraph, while the PHP parser produces two separate ones. The corresponding test fails in wt2html mode in Parsoid, so should be fixed at some point. Round-tripping works fine though.

The round-trip breakage in this area should mostly be fixed now, so closing this bug. The render difference can be addressed separately, but is of lower priority right now.

(In reply to comment #3)

The render difference can be addressed separately, but is of lower
priority right now.

Does this need a separate bug?

Not necessarily, as the failing parser test should point that out to us. Can create one though, referencing the 'Tag-like HTML structures are passed through as text' test.