Page MenuHomePhabricator

Underscores in namespace become plus signs if you switch from app to "view in browser"
Closed, ResolvedPublic1 Estimated Story Points

Description

On the bottom of every page viewed in the app, there's a "view in browser" link. If I click this link, for example to add a section to a user talk page (which doesn't work in the app), user_talk:xy becomes user+ talk:xy.

Event Timeline

Tbayer subscribed.

Also reported on the dewiki village pump where someone specified it's about the Android app (I can reproduce it there too), hence adding it to the Android backlog

@Jonathan_Data: Thanks for reporting this! Do you plan to work on a patch to fix this (as you assigned the task to yourself)? Do you need any help to get started? :)

@Aklapper: I didn't yet understand what the assigning of a task to someone actually meant.

MBinder_WMF set the point value for this task to 1.May 18 2016, 7:28 PM

The reason for this is that the Java URLEncoder encodes the url by replacing the space character of "User talk" by "+". To resolve this we can replace the "+" sign with "%20" so that the correct URL can be formed.
Source: http://stackoverflow.com/questions/4737841/urlencoder-not-able-to-translate-space-character
I would like to work on this if the suggested fix is correct?

Change 337046 had a related patch set uploaded (by Sandaru):
Fix url encoding error

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

@Mholloway Thank you very much. I submitted the patch. Please let me know if it need any modifications.

Change 337046 merged by jenkins-bot:
Fix url encoding error

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