Page MenuHomePhabricator

When pasting text, don't translate multiple normal spaces into multiple non-breaking spaces
Closed, ResolvedPublic8 Story Points

Description

Steps to reproduce:

  1. Copy a template and list of parameters, using a common human-friendly format:
{{Infobox example
| parameter1   =
| para2        =
}}
  1. See that the template doesn't work, because the pretty-printed spaces got converted to non-breaking spaces

Event Timeline

Restricted Application added a project: VisualEditor. · View Herald TranscriptJan 27 2017, 5:04 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Elitre added a subscriber: Elitre.Jan 27 2017, 5:11 PM

I get {{Infobox example↵| parameter1 =↵| para2 =↵}} in both Chrome & FF, which is differently broken, we should be converting the newlines.

The issue here is that the pasted HTML is wrapped in a <pre> so it manages to bypass the line-splitting logic.

Change 334852 had a related patch set uploaded (by Esanders):
Pass text as string to insertDocument when detected as plain text

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

Change 334852 merged by jenkins-bot:
Pass text as string to insertDocument when detected as plain text

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

Change 334906 had a related patch set uploaded (by Jforrester):
Update VE core submodule to master (139bdf7)

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

Change 309472 had a related patch set uploaded (by Jforrester):
Update VE core submodule to master (139bdf7)

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

Change 309472 merged by jenkins-bot:
Update VE core submodule to master (139bdf7)

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

Ahem. This is now rather more broken in master. :-(

Jdforrester-WMF triaged this task as High priority.
Jdforrester-WMF moved this task from To Triage to TR1: Releases on the VisualEditor board.
Jdforrester-WMF set the point value for this task to 8.

Reverted back to the previously-broken behaviour. Sorry all.

Change 335086 had a related patch set uploaded (by Esanders):
Always convert newlines to paragraph breaks in source mode

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

Change 335086 merged by jenkins-bot:
Always convert newlines to paragraph breaks in source mode

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

Change 335681 had a related patch set uploaded (by Jforrester):
Update VE core submodule to master (495524f)

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

Change 335681 merged by jenkins-bot:
Update VE core submodule to master (495524f)

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

Is the "multiple spaces turn into non-breaking spaces" bit resolved? I thought that James reverted that part.

Is the "multiple spaces turn into non-breaking spaces" bit resolved? I thought that James reverted that part.

It should be. Reverted on 30 January, re-done on 2 Feb.