修订版 | ea1b7596d492faea4a21f7210ea6dbdd4c8eb8cb (tree) |
---|---|
时间 | 2018-12-19 06:13:56 |
作者 | umorigu <umorigu@gmai...> |
Commiter | umorigu |
BugTrack/2478 Handle plus(+) char in URL as space for page name
* page name encode - name:'A B' => url:'A+B'
* page name decode - url:'A+B' => name:'A B'
@@ -462,7 +462,7 @@ function arg_check($str) | ||
462 | 462 | |
463 | 463 | function _pagename_urlencode_callback($matches) |
464 | 464 | { |
465 | - return rawurlencode($matches[0]); | |
465 | + return urlencode($matches[0]); | |
466 | 466 | } |
467 | 467 | |
468 | 468 | function pagename_urlencode($page) |
@@ -402,7 +402,7 @@ if (! isset($vars['cmd']) && ! isset($vars['plugin'])) { | ||
402 | 402 | $arg = preg_replace("#^([^&]*)&.*$#", "$1", $arg); |
403 | 403 | if ($arg == '') $arg = $defaultpage; |
404 | 404 | if (strpos($arg, '=') !== false) $arg = $defaultpage; // Found '/?key=value' |
405 | - $arg = rawurldecode($arg); | |
405 | + $arg = urldecode($arg); | |
406 | 406 | $arg = strip_bracket($arg); |
407 | 407 | $arg = input_filter($arg); |
408 | 408 | $get['page'] = $post['page'] = $vars['page'] = $arg; |