Page MenuHomePhabricator

Read-mode references pasted into VE via a third-party editor are not stripped
Closed, ResolvedPublic

Description

T150418 strips references pasted directed from read mode to VE, but if they are pasted into a third-party editor, it is possible the HTML will be sufficiently mangled that our selector won't work, e.g.

  1. Copy a reference from read mode
  2. Paste into LibreOffice writer
  3. Copy from LO
  4. Paste into VE
  5. Observe the linked numbers are preserved (although not the <sup>)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 10 2019, 11:26 AM
Esanders moved this task from Incoming to In progress on the VisualEditor (Current work) board.

Change 535556 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/VisualEditor@master] Add another looser selector for catching pasted references

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

Change 535556 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Add another looser selector for catching pasted references

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

matmarex moved this task from Inbox to High Priority on the Editing QA board.Sep 18 2019, 3:24 AM

@Esanders: Is the expected result here, it will strip references pasted from LO to VE as well. For now, what I see is nothing gets pasted into VE when I copy-paste the reference from LO after step 4.

matmarex added a subscriber: matmarex.

Yes, that is the expected behavior. We currently have no way to preserve the content of the reference, and pasting just the link is useless and annoying, so we paste nothing.

ppelberg added subscribers: iamjessklein, ppelberg.EditedDec 24 2019, 6:58 PM

Yes, that is the expected behavior. We currently have no way to preserve the content of the reference, and pasting just the link is useless and annoying, so we paste nothing.

What's led us to think pasting nothing is better than pasting the plaintext of what is being copied (e.g. "[1]")?

I wonder whether the current behavior (pasting nothing) will confuse contributors [2] as the lack of feedback communicates nothing about VE's support – or lack thereof – pasting references from read mode.

@iamjessklein, are you able to share your opinion about whether the following behavior is okay to you?

Behavior this patch creates

  1. "Copy" a reference from read mode
  2. Open VE for any article
  3. Attempt to "paste" said reference into VE
  4. Nothing happens; no content is pasted; no feedback is given

  1. @matmarex, if I'm not understanding the "Behavior this patch creates" properly, please let me know.
  2. See: T241678
Ryasmeen added a comment.EditedJan 2 2020, 8:58 PM

I share @ppelberg's concern, if we are not doing anything after an action, at the very least an explicit feedback is usually expected.

JTannerWMF added a project: Editing Design.
JTannerWMF added a subscriber: JTannerWMF.

This task is awaiting input from our designer.

matmarex moved this task from To Triage to Triaged on the VisualEditor board.Feb 12 2020, 5:22 PM

The task as filed is fixed, so we should probably move the discussion around keeping the plain text "[1]" or providing some other feedback into a new task.

ppelberg closed this task as Resolved.Sat, Jun 13, 1:58 AM

The task as filed is fixed, so we should probably move the discussion around keeping the plain text "[1]" or providing some other feedback into a new task.

See task: T255329

Restricted Application added a project: User-Ryasmeen. · View Herald TranscriptSat, Jun 13, 1:58 AM