Index: trunk/phase3/includes/Title.php |
— | — | @@ -283,7 +283,12 @@ |
284 | 284 | if( preg_match( '!\[{2}(.*?)(?:\||\]{2})!', $text, $m ) ) { |
285 | 285 | // Strip preceding colon used to "escape" categories, etc. |
286 | 286 | // and URL-decode links |
287 | | - $m[1] = urldecode( ltrim( $m[1], ':' ) ); |
| 287 | + if( strpos( $m[1], '%' ) !== false ) { |
| 288 | + // Match behavior of inline link parsing here; |
| 289 | + // don't interpret + as " " most of the time! |
| 290 | + // It might be safe to just use rawurldecode instead, though. |
| 291 | + $m[1] = urldecode( ltrim( $m[1], ':' ) ); |
| 292 | + } |
288 | 293 | $title = Title::newFromText( $m[1] ); |
289 | 294 | // Redirects to Special:Userlogout are not permitted |
290 | 295 | if( $title instanceof Title && !$title->isSpecial( 'Userlogout' ) ) |