Page MenuHomePhabricator

For some HTML entities, the edit preview incorrectly shows the interpreted value (e.g. "[") but the saved edit shows "["
Closed, DuplicatePublic

Description

[ and ] as well as similar named entities like   do not work correctly in the parser, but are displayed as apparently working in preview.

Event Timeline

(example links moved to description)

Thanks for reporting this! It took me a bit to understand what exactly this bug report is about, as there were no steps to reproduce but two links to look at results. Plus "Preview" can mean a few things... As this is about the preview of an edit before you publish an edit, I'm going to remove the Page-Previews tag. :)

Steps to reproduce:

  1. Use the 2017 wikitext editor mode of VisualEditor
  2. Paste the following three lines:
* da m²
* da m²
* dam²
  1. Click "Save Page"
  2. Click "Show Preview"
  3. See the second line is rendered as da m²
  4. Click "Save Page"
  5. See the second line is rendered as da m²

It's an interesting question whether to make the edit preview not interpret these HTML entities correctly, or whether to make the parser not encode the ampersand into  . But indeed, the behavior should be consistent.

Aklapper renamed this task from enwiki: Visual source editor preview incorrectly displays [ as [ to For some HTML entities, the edit preview incorrectly shows the interpreted value (e.g. "[") but the saved edit shows "[".Jul 31 2019, 12:36 AM