Page MenuHomePhabricator

VisualEditor: Pasting text into VE from external text processor removes newlines
Closed, ResolvedPublic

Description

System environment:
Win7 X64
Google Chrome 29.0.1547.62 m

Steps to reproduce:
Open a page
Edit it in VE
Copy-paste the following text:
a
b
c
d
e

Expected output:
a
b
c
d
e

Actual output:
abcde

The problem has been tested with notepad++ as the external editor, with line endings in windows format (CRLF), UNIX format (LF) and MAC format (CR). Newline is not copied in any of the cases.

The problem has also been tested by trying to copy-paste html text from chrome itself. Newline is not copied.


Version: unspecified
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=52096

Details

Reference
bz53828

Event Timeline

bzimport raised the priority of this task from to Normal.Nov 22 2014, 1:54 AM
bzimport set Reference to bz53828.

Confirmed in Firefox 23 / Xubuntu Linux / Monobook

Using kwrite:
Tested with \n \r and \r\n end of lines and it makes no difference.
Tested also using UTF-8, UTF-16, ISO-8859-1, ISO-8859-2 and Windows-1258 encodings.

Also tested copying from this page viewed in Firefox, Konqueror and Linuks, from a PDF, a text file in a terminal, and again from kwrite using the following:

a

b

c

d

e

None of it makes the slightest bit of difference.

https://en.wikipedia.org/w/index.php?title=User%3AThryduulf%2Fsandbox3&diff=571705481&oldid=571089410 is the copy from comment 0

Change 86664 had a related patch set uploaded by Esanders:
Rich paste

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

Works with gedit & chrome with the rich paste patch.

Change 86664 merged by jenkins-bot:
Rich paste

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