Page MenuHomePhabricator

Read-mode references pasted into VE via a third-party editor are not stripped
Open, Needs TriagePublic

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>)

Details

Related Gerrit Patches:
mediawiki/extensions/VisualEditor : masterAdd another looser selector for catching pasted references

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.