Page MenuHomePhabricator

Template URL double encoding
Closed, ResolvedPublic2 Estimated Story PointsBUG REPORT

Description

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

Open a ContentTranslation page on fr.wikipedia.org. Find content generated by a template. Click on it.

What happens?:

The side bar shows the template that generates the content with a link.

image.png (242×421 px, 9 KB)

The link is broken because its href is double-encoded (in this case to https://en.wikipedia.org/wiki/Mod%25C3%25A8le:Chem2)

What should have happened instead?:

The URL should not be double encoded. Additionally, the namespace for the model should probably match the localized namespace for the destination wiki (Modèle:Chem2 does not work on enwiki).

Event Timeline

hueitan subscribed.

@ihurbain, could you please provide the specific article you were translating and the language pair (from/to) when you encountered this double-encoding issue with the template URL?

For sure I have seen that on the translation of Calcium Lactate from English to French; the issue is also present on https://fr.wikipedia.org/wiki/Special:ContentTranslation?from=en&to=fr&page=Sodium+hydrogenoxalate (again, English to French) - click on the molecule name in the first paragraph of the original content for a repro.

Change #1150600 had a related patch set uploaded (by Huei Tan; author: Huei Tan):

[mediawiki/extensions/ContentTranslation@master] CX: Fix URL decoding for titles for transclusion node

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

abi_ triaged this task as Medium priority.May 26 2025, 4:00 PM
abi_ set the point value for this task to 2.

Change #1150600 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX: Fix URL decoding for titles for transclusion node

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