Page MenuHomePhabricator

Converter lets you put a paragraph directly in a list, which shouldn't be allowed and breaks fixUpInsertion
Open, MediumPublic8 Estimated Story Points

Description

I used a cut-n-paste sample that caused problems and https://edg2s.github.io/content-editable-sandbox/ to produce a short snippet that results in an error if pasted in IE or FF. The snippet is:

<font></font><ul><font> </font><li>dummy text</li></ul>

Removing either pair of font tags or the space between the second pair removes the error.

FF and IE both point to ve.dm.Node.static.cloneElement and indicate that clone is null and/or does not have an "internal" property.

Event Timeline

MarkAHershberger raised the priority of this task from to Needs Triage.
MarkAHershberger updated the task description. (Show Details)
MarkAHershberger subscribed.
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

The root of the problem is that we convert <ul><p>Foo</p></ul> to [ list, paragraph, F, o, o, /paragraph, /list ] which violates list's childNodeType constraint (it should only contain listItems). We should do something more sensible.

Esanders renamed this task from ve.dm.Node.static.cloneElement can be called w/o a ve.clone-able element in IE or FF to Converter lets you put a paragraph directly in a list, which shouldn't be allowed and breaks fixUpInsertion.Apr 15 2015, 3:10 PM
Esanders set Security to None.

The content I got was generated by Outlook when pasting into Internet Explorer.

Note that what I'm getting is <ul> <font> (SPACE) </font> <li> content </li> <font> (SPACE) </font> <li> content </li> <font> (SPACE) </font> </ul>

It may be that "<font> (SPACE) <font>" is seen as essentially null. I wouldn't want additional <li>'s created, but perhaps moving the <font> tags inside the <li> would be fine if you're worried about losing content. Alternatively, just dropping "<font> (SPACE) </font>" wouldn't offend me.

Jdforrester-WMF subscribed.

At the weekly triage meeting on 2015-07-07 we decided that this was important but not urgent to do this quarter.