Page MenuHomePhabricator

'already blocked' warning wrongly formatted if username contains a space
Closed, InvalidPublicBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):

What happens?:
The displayed warning contains a formatting error. In this case, the username was "Mark K***e" (removed explicit string to reduce findability. This gives this html:

<a class="external text" href="https://nl.wikipedia.org/w/index.php?title=Speciaal:Ipblocklist&amp;action=unblock&amp;ip=Mark">K***e deblokkeer</a>

Screen shot:

Screen Shot 2021-11-17 at 11.38.43 AM.png (75×344 px, 9 KB)

What should have happened instead?:
The space in the username should have been converted to an underscore. The unblock link consequently also does not work.

I would expect this html:

<a class="external text" href="https://nl.wikipedia.org/w/index.php?title=Speciaal:Ipblocklist&amp;action=unblock&amp;ip=Mark_K***e">deblokkeer</a>

Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc: n/a

Event Timeline

Umherirrender subscribed.

Needs fixing on wiki: https://nl.wikipedia.org/w/index.php?title=MediaWiki:Ipb_already_blocked&action=edit

It is not possible to use (the value of) $1 without any urlencoding in a url. When $1 would contain underscore the visible name is wrong, try {{PAGENAMEE:$1}} or {{urlencode:$1}} when building the url. The url looks wrong, as there is no action=unblock, it should be possible to link with wikilinks instead [[Special:Unblock/$1]]

I see, thanks. I implemented the urlencode, hopefully that does the trick.