Page MenuHomePhabricator

MediaWiki:Blockipsuccesstext messes up with spaces
Closed, InvalidPublic

Description

Author: p_simoons

Description:
MediaWiki:Blockipsuccesstext creates a URL containing $1 (the user name that was
blocked). Since a space is the delimeter between the actual URL and its
description (e.g. [http://someplace.net this link]), if the user name happens to
contain a space, the URL is not what you expect it to be.

A solution would be to have the software replace the spaces by underscores.


Version: unspecified
Severity: normal

Details

Reference
bz4321

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 8:59 PM
bzimport set Reference to bz4321.
bzimport added a subscriber: Unknown Object (MLST).

It seems to be wikitext, with wiki links, so spaces should work fine.

'blockipsuccesstext' => '[[{{ns:Special}}:Contributions/$1|$1]] has been blocked.
<br />See[[{{ns:Special}}:Ipblocklist|IP block list]] to review blocks.',

p_simoons wrote:

The phrase

[http://en.wikipedia.org/w/index.php?title=Special%3ALog&type=block&user=&page=User:$1
block log]

is a raw URL and doesn't work properly if $1 contains spaces.

p_simoons wrote:

Well, yes, good point. I was just wondering if there was an easy way to make $1
use underscores rather than spaces, but if thee isn't I won't bother you with it.

Well, underscores isn't sufficient. You'd need a url-encoded version.