Improve handling of stray table tags / Verify that we handle stray table tags correctly
OpenPublic

Description

Occasionally, pages have stray opening table tags which may end up screwing up DSR computations (which in turns messes up selser). It is possible that our latest foster parenting code implicitly handles this by wrapping the entire table as templated and protected a large body of code (which could then serve as a flag to the user to look for bugs in the wikitext souce). So, it might be worth verifying this and adding tests to spec this behavior.

See the bug report: https://en.wikipedia.org/w/index.php?title=Wikipedia:VisualEditor/Feedback&oldid=574391235#Duplicated_content_when_deleting_apparently_blank_lines

See my response that fixed the problem in the wikitext source: https://en.wikipedia.org/w/index.php?title=Wikipedia:VisualEditor/Feedback&oldid=574483272#References_and_tables

If this is not already handled by our handleUnbalancedTables and markFosteredContent DOM passes, we may need to tackle this -- by maybe adding a fixup in TokenStreamPatcher that enforces limited table scope (section boundaries is the obvious scope limiter => close unclosed tables whenever section heading tokens are encountered).

To be investigated and fixed.


Version: unspecified
Severity: normal

bzimport added a project: Parsoid.Via ConduitNov 22 2014, 2:14 AM
bzimport set Reference to bz54605.
ssastry created this task.Via LegacySep 25 2013, 5:04 PM
Arlolra added a comment.Via ConduitOct 3 2013, 10:42 PM

(In reply to comment #0)

Occasionally, pages have stray opening table tags which may end up screwing
up
DSR computations (which in turns messes up selser). It is possible that our
latest foster parenting code implicitly handles this by wrapping the entire
table as templated and protected a large body of code (which could then serve
as a flag to the user to look for bugs in the wikitext souce). So, it might
be
worth verifying this and adding tests to spec this behavior.

That seems to happen if a template is present, as in:

{|

{{echo|hi}}

;Ho

However, that's not the case in the bug report. It's more like,

{|

;Off to work we go

See the bug report:
https://en.wikipedia.org/w/index.php?title=Wikipedia:VisualEditor/
Feedback&oldid=574391235#Duplicated_content_when_deleting_apparently_blank_li
nes

See my response that fixed the problem in the wikitext source:
https://en.wikipedia.org/w/index.php?title=Wikipedia:VisualEditor/
Feedback&oldid=574483272#References_and_tables

If this is not already handled by our handleUnbalancedTables and
markFosteredContent DOM passes, we may need to tackle this -- by maybe
adding a
fixup in TokenStreamPatcher that enforces limited table scope (section
boundaries is the obvious scope limiter => close unclosed tables whenever
section heading tokens are encountered).

Seems reasonable.

To be investigated and fixed.

Arlolra placed this task up for grabs.Via WebNov 25 2014, 8:05 PM
Arlolra set Security to None.
ssastry moved this task to Robustness on the Parsoid workboard.Via WebDec 22 2014, 12:45 AM
marcoil moved this task to Backlog on the Parsoid workboard.Via WebFeb 13 2015, 12:49 PM

Add Comment