Page MenuHomePhabricator

VisualEditor percent-encodes all single quote in red link target fragments, producing dirty diff
Closed, ResolvedPublicBUG REPORT

Assigned To
Authored By
Pols12
Dec 19 2022, 5:55 PM
Referenced Files
Restricted File
Feb 8 2023, 9:09 PM
F36760633: Screenshot 2023-02-06 at 18.12.08.png
Feb 8 2023, 9:07 PM
F36760628: Screenshot 2023-02-06 at 18.08.53.png
Feb 8 2023, 9:07 PM
F36439957: Screenshot 2023-01-23 at 18.18.12.png
Jan 23 2023, 6:42 PM

Description

Steps to replicate the issue (include links if applicable):

What happens?:
VisualEditor unexpectedly turns all [[page#anchor's|text]] into [[page#anchor%27s]] as soon as [[page]] does not exist (red link), producing a dirty diff.

What should have happened instead?:
VisualEditor should not edit those links, at least when they have not been edited by the user.

Other info:
Given this Wikipedia dirty diff did not happen previously, this bug is a recent regression.

Event Timeline

Probably related to T324352, either caused by the same Parsoid change as that issue, or by our fix for that issue.

I checked and this would be fixed by my rewrite of the URL parsing code for T325249. It seems like a rare scenario, so I suggest that we don't bother fixing this separately, assuming those changes go through.

matmarex moved this task from To Triage to Triaged on the VisualEditor board.
matmarex moved this task from Inbox to QA on the Editing-team (Kanban Board) board.
matmarex added a project: Editing QA.

Patches for T325249 are merged, we can double-check if this is fixed (after the changes are deployed).

matmarex removed a project: Verified.

The fix was reverted due to revealing issues in ContentTranslation: T328143. Hopefully we'll find a better solution for that and reinstate this soon.

Change 884502 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/VisualEditor@master] Re-apply "Rewrite mw.libs.ve.getTargetDataFromHref with URL API"

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

Change 884502 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Re-apply "Rewrite mw.libs.ve.getTargetDataFromHref with URL API"

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

The fix will be deployed again next week, on the usual schedule. Sorry about that, it's impractical to backport due to dependencies on other software.

This looked like the attached images:

Screenshot 2023-02-06 at 18.08.53.png (1×1 px, 226 KB)

Screenshot 2023-02-06 at 18.12.08.png (940×1 px, 139 KB)

{F36816278}