Page MenuHomePhabricator

Colons get prepended when switching between input modes
Closed, ResolvedPublic

Description

This task is about the : that are being prepended to each line in the following scenario...

Behavior

  1. Visit: https://en.wikipedia.beta.wmflabs.org/wiki/Talk:Cats
  2. Click any "Reply" link to open the tool
  3. In source mode, enter the following:
Lorem
Ipsum
{{quote|Quoted text}}
More text
  1. Switch to the visual mode
  2. Switch back to the source mode

Actual

  1. ❗️Notice : is added to the the line that contains the {{Quote}} template and each line above it:
:Lorem
:Ipsum
:{{quote|Quoted text}}
More text
  1. Switch to the visual mode

Expected

  1. ✅Notice no : are visible in the comment:
Lorem
Ipsum
{{quote|Quoted text}}
More text``

Event Timeline

ppelberg renamed this task from Colons get preprended when switching between input modes to Colons get prepended when switching between input modes.Jun 18 2020, 2:56 AM

Every time you switch back and forth, an additional set of colons is inserted. Try it: Switch to Source (so you can see the first colons). Now click Visual and then Source again, and repeat that several times. Notice that you have a lot more colons now.

Every time you switch back and forth, an additional set of colons is inserted.

Exactly. I mentioned this in my feedback too.

This particular issue is due to the template on beta being broken. On live the only issue you get is T255740#6244596

This particular issue is due to the template on beta being broken. On live the only issue you get is T255740#6244596

Confirmed [1]. I'm moving this to "Needs discussion" for the time being.


Screen Shot 2020-06-22 at 6.48.10 PM.png (1×1 px, 146 KB)

Esanders claimed this task.

We have since prevented users switching to visual mode when templates are being used, so this isn't an issue any more. If we do add support templates in the future, it would be by encapsulating the whole comment and it is unlikely this bug would come back.

image.png (189×543 px, 33 KB)