• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

修訂ea1b7596d492faea4a21f7210ea6dbdd4c8eb8cb (tree)
時間2018-12-19 06:13:56
作者umorigu <umorigu@gmai...>
Commiterumorigu

Log Message

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'

Change Summary

差異

--- a/lib/func.php
+++ b/lib/func.php
@@ -462,7 +462,7 @@ function arg_check($str)
462462
463463 function _pagename_urlencode_callback($matches)
464464 {
465- return rawurlencode($matches[0]);
465+ return urlencode($matches[0]);
466466 }
467467
468468 function pagename_urlencode($page)
--- a/lib/init.php
+++ b/lib/init.php
@@ -402,7 +402,7 @@ if (! isset($vars['cmd']) && ! isset($vars['plugin'])) {
402402 $arg = preg_replace("#^([^&]*)&.*$#", "$1", $arg);
403403 if ($arg == '') $arg = $defaultpage;
404404 if (strpos($arg, '=') !== false) $arg = $defaultpage; // Found '/?key=value'
405- $arg = rawurldecode($arg);
405+ $arg = urldecode($arg);
406406 $arg = strip_bracket($arg);
407407 $arg = input_filter($arg);
408408 $get['page'] = $post['page'] = $vars['page'] = $arg;