Page MenuHomePhabricator

Copying a rendered table into VE missed a |- and other parsing issues
Closed, ResolvedPublic

Description

A table is rendered correctly during preview/live-edit, but problems occur after saving.

Steps to reproduce:

  1. Using this section https://en.wikipedia.org/w/index.php?title=User:Quiddity_%28WMF%29/sandbox&oldid=680711195 (taken from an actual talkpage)
  2. Copy the entire rendered section, from above the ==RfC== header, past the table, down to anywhere below the table.
  3. paste that content into either:
    1. a VisualEditor-mode sandbox
    2. a new post in a Flow sandbox, using VE-edit-mode.
  4. It will look mostly as expected during the edit,* but shows problems with the table upon saving.

*unexpected during preview, are the ↵arrows, which don't match linebreaks in the source text.


Scenario A) example at https://en.wikipedia.org/w/index.php?title=User:Quiddity_%28WMF%29/sandbox&oldid=680707793

Preview (looks mostly good):

Screenshot from 2015-09-12 10:30:02.png (1×1 px, 312 KB)

Outcome:
Screenshot from 2015-09-12 10:45:55.png (876×1 px, 193 KB)

The main missing bit, is a crucial |-: (although it also added a jquery-tablesorter which was unexpected (by me), and many erroneous linebreaks)
Screenshot from 2015-09-12 10:39:54.png (608×1 px, 216 KB)


Scenario B) example at https://en.wikipedia.org/w/index.php?title=Topic:Sosjy6pjhih092j2&topic_showPostId=sosk8798djw6mz2k#flow-post-sosk8798djw6mz2k

Preview:

Screenshot from 2015-09-12 11:00:16.png (832×1 px, 261 KB)

Outcome:
Screenshot from 2015-09-12 10:52:42.png (832×1 px, 153 KB)

The wikitext of the outcome, has the same problems as Scenario A, but also adds an unexpected title="Sort ascending" class="headerSort" | to each of the headers:
Screenshot from 2015-09-12 11:02:43.png (832×1 px, 178 KB)

Event Timeline

Quiddity raised the priority of this task from to Needs Triage.
Quiddity updated the task description. (Show Details)
Quiddity added a project: Parsoid.
Quiddity subscribed.

The line breaks are specific to what VE gets from the copy-paste functionality of the browsers. Parsoid is not involved there.

When I opened that sandbox in VE and then copy-pasted it onto my sandbox here, it worked just fine for me. https://www.mediawiki.org/w/index.php?title=User%3ASSastry_%28WMF%29%2FSandbox&type=revision&diff=1880770&oldid=1816970
There is jquery-tablesorter, nor is there a missing |- tag. So, I think this is probably browser specific and what VE generates on copy-paste. I used Firefox on a Ubuntu box.

What browser did you use for the copy-paste? Added the VisualEditor project in case this is known.
Also, worth trying to reproduce with a smaller test case.

What browser did you use for the copy-paste? Added the VisualEditor project in case this is known.
Also, worth trying to reproduce with a smaller test case.

I'm also using Firefox in Ubuntu.
One other user, who also uses Firefox, was experiencing problems but had a different result, visible at https://en.wikipedia.org/wiki/Topic:Sor98w5yvlxnd79o but I cannot reproduce the exact error that he is getting (which omits the entire !header section, and inserts <nowiki>s throughout).

I think this is VE-land issue with the HTML that is pasted in copy-paste mode. @Jdforrester-WMF, @Esanders.