Page MenuHomePhabricator

Image page link to Commons does not escape question marks
Open, In Progress, Needs TriagePublic1 Estimated Story Points

Description

Steps to reproduce

  1. Go to https://en.wikipedia.org/wiki/William_Frederick_Yeames?wprov=sfla1 in the app
  2. Tap the picture under the subheading "And When Did You Last See Your Father?"
  3. Choose "Go to image page" from the kebab menu
  4. Choose "File page on Wikimedia Commons" at the foot of the page

Expected results

Browser opens on https://commons.wikimedia.org/wiki/File:William_Frederick_Yeames_-_And_when_did_you_last_see_your_father%3F_-_Google_Art_Project.jpg

Actual results

Browser opens on https://commons.wikimedia.org/wiki/File:William_Frederick_Yeames_-_And_when_did_you_last_see_your_father?_-_Google_Art_Project.jpg

which fails. Note the ? after "father".

Environments observed

App version: 50595-r-2026-06-16
Android OS versions: 16
Device model: Pixel 10 Pro
Device language: en_GB

Event Timeline

Hi! I was able to reproduce this issue by following the steps described in the task. I'd like to investigate the URL generation logic in the Android app and work on a fix. If possible, could this task be assigned to me?
Thank you!

Zaidusyy changed the task status from Open to In Progress.EditedJun 27 2026, 7:02 PM

I've opened a PR to fix this. It swaps out URLEncoder for Uri.encode so we stop escaping the namespace colon, which fixes the redirect loop breaking the Commons links.

PR is up for review here: https://github.com/wikimedia/apps-android-wikipedia/pull/6730