Page MenuHomePhabricator

Slugs are created inside empty table rows, creating pawns if used
Closed, ResolvedPublic

Description

At https://en.wikipedia.org/w/index.php?title=Churnet_Valley_Railway&diff=prev&oldid=569277862 it seems that a table ending with trailing new line syntax

-
}

caused pawns to be added to the article. As discussed at https://en.wikipedia.org/w/index.php?title=Wikipedia:VisualEditor/Feedback&oldid=569732999#Chess_pieces_still_happening this syntax, although technically wrong, will continue to be added to articles. VE and Parsoid should therefore deal with this cleanly without the addition of any pawns to the article.


Version: unspecified
Severity: normal

Details

Reference
bz53214

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 2:09 AM
bzimport set Reference to bz53214.

Pawns are firmly VE territory. Moving to the VisualEditor product.

To perhaps clarify, VE and parsoid should accept both

content
-
}

and

content
}

as validly closed templates that should be displayed and rendered identically. Both syntaxes should be retained as is when roundtripping.

(In reply to comment #2)

To perhaps clarify, VE and parsoid should accept both

content
-
}

and

content
}

as validly closed templates that should be displayed and rendered
identically.

We currently don't strip empty table rows, which seems to be done in some conditions in the PHP parser + tidy combo. We could emulate this behavior in templated content and maybe also outside of templated content, but will need to avoid dirty diffs and preserve WYSIWYG behavior even when another row is added in VE.

Both syntaxes should be retained as is when roundtripping.

This should already be the case in Parsoid. I just verified this at http://parsoid.wmflabs.org/_rtform/. Pawn insertion would a DOM modification in VE.

Change 119067 had a related patch set uploaded by Esanders:
Only insert slugs where paragraphs are allowed

https://gerrit.wikimedia.org/r/119067

Change 119067 merged by jenkins-bot:
Only insert slugs where paragraphs are allowed

https://gerrit.wikimedia.org/r/119067

Jdforrester-WMF renamed this task from VisualEditor: Slugs are created inside empty table rows, creating pawns if used to Slugs are created inside empty table rows, creating pawns if used.Nov 24 2014, 2:19 AM
Jdforrester-WMF set Security to None.