Last modified: 2014-02-06 01:54:44 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T61603, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 59603 - VisualEditor: Pasting should remove formats (and other types of content?) that aren't allowed in the target
VisualEditor: Pasting should remove formats (and other types of content?) tha...
Status: RESOLVED FIXED
Product: VisualEditor
Classification: Unclassified
ContentEditable (Other open bugs)
unspecified
All All
: High normal
: VE-deploy-2014-02-06
Assigned To: Ed Sanders
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-01-03 19:23 UTC by WhatamIdoing
Modified: 2014-02-06 01:54 UTC (History)
8 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description WhatamIdoing 2014-01-03 19:23:52 UTC
Intention:
Add a caption to an image without having to type out the name by hand.

Steps to Reproduce:
1. Add an image in VisualEditor (e.g., an image of a person).  Open the caption dialog.
2. Go to another window (e.g., an article about the person) and copy a =Name= from the article title.
3. Paste the rich text into the caption.

Actual Results:  
The pasted text retained rich formatting.  It is not possible to remove the =Heading= formatting.  Only '''text''' <s>formatting</s> can be added or removed in that dialog.  So if you copy the article title from [[George Washington]] and paste it into the caption box, then it produces this wikitext:

= <span dir="auto">George Washington</span> =

and there is no way to remove the formatting.

Expected Results:  
That either you could remove the formatting, or ideally, that the caption box would strip the unwanted formatting automagically.  There's no obvious reason why someone would need or want a ==Heading== of any level in a caption.

Reproducible: Didn't try

Confirmed in Safari 6 and Firefox 26
Comment 1 Ed Sanders 2014-01-31 17:58:38 UTC
SurfaceWidgets currently aren't even implementing the main surface's paste rules.
Comment 2 Gerrit Notification Bot 2014-02-05 11:39:16 UTC
Change 110960 had a related patch set uploaded by Esanders:
Implement surface paste rules for media/ref dialogs

https://gerrit.wikimedia.org/r/110960
Comment 3 Gerrit Notification Bot 2014-02-05 19:23:54 UTC
Change 110960 merged by jenkins-bot:
Implement surface paste rules for media/ref dialogs

https://gerrit.wikimedia.org/r/110960
Comment 4 Roan Kattouw 2014-02-05 20:29:47 UTC
Disallowed inside references: references, reference lists, lists, definition lists, tables. Headings can be pasted but are converted to paragraphs.

Disallowed inside image captions: lists, definition lists, tables. Headings can be pasted but are converted to paragraphs.
Comment 5 WhatamIdoing 2014-02-05 21:01:17 UTC
What does "disallowed" mean?  People do put lists into refs.  See https://en.wikipedia.org/wiki/Wikipedia:Verifiability#cite_note-9 for an example.

It is important that people be able to paste something that was in a list format, even if it was converted into a paragraph upon pasting.
Comment 6 Ed Sanders 2014-02-05 23:29:02 UTC
We mean discouraged. At the moment there's a Parsoid bug that breaks list rendering, but we can revisit that decision if users really want it. And yes, the patch will convert lists to paragraphs.
Comment 7 James Forrester 2014-02-06 01:54:44 UTC
Closing for now, though we may make further changes about removing or allowing certain kinds of formatting in future.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links