Allow compatibility with incoming URLs with '+' used instead of space. These are created by some external search tools, and some very old links on the wiki. Our old rewrite rules on Wikipedia let this through, but the new ones don't without explicit support.
This commit is contained in:
parent
e03353126d
commit
09a414a149
1 changed files with 5 additions and 5 deletions
|
|
@ -90,11 +90,11 @@ class Title {
|
|||
{
|
||||
global $wgLang, $wgServer;
|
||||
$t = new Title();
|
||||
$s = urldecode( $url ); # This is technically wrong, as anything
|
||||
# we've gotten is already decoded by PHP.
|
||||
# Kept for backwards compatibility with
|
||||
# buggy URLs we had for a while...
|
||||
$s = $url;
|
||||
|
||||
# For compatibility with old buggy URLs. "+" is not valid in titles,
|
||||
# but some URLs used it as a space replacement and they still come
|
||||
# from some external search tools.
|
||||
$s = str_replace( "+", " ", $url );
|
||||
|
||||
# For links that came from outside, check for alternate/legacy
|
||||
# character encoding.
|
||||
|
|
|
|||
Loading…
Reference in a new issue