The way the wiki handles pages does not play well with URL encoded characters. Firefox automatically URL encodes whatever page you go to when you navigate back to it from the suggestions in your address bar:


But the wiki considers folding@home and folding%40home to be different pages!
The page title should probably be urldecoded before we try to fetch the page content from the database.
This chaneg could either be made here, in the page view action:
|
function view($path, $action, $title, $content) |
|
{ |
|
$content['PageNav']->Active("View Page"); |
|
|
|
$PageQuery = mysql_query("SELECT `ID`,`Title`,`Content`,`Edits`,`Views`,`EditTime` FROM `Wiki_Pages` WHERE `Path`='$path'"); |
Or it could be done in the index.php file as soon as the path variable is defined:
|
// New nginx rewrite |
|
else |
|
{ |
|
$uri = parse_url($_SERVER['REQUEST_URI']); |
|
$Path = $uri['path']; |
One caveat to adding urldecoding at that point will be the need to change the way page redirects work:
|
if(strpos($Path, ' ') !== FALSE || strpos($Path, '%20') !== FALSE) |
|
die(Redirect(str_replace(array(' ', '%20'), '-', $Path), 0)); |
|
|
|
$Path = trim($Path, "/"); |
|
|
|
if($Path == "home") |
|
$Path = ""; |
The way the wiki handles pages does not play well with URL encoded characters. Firefox automatically URL encodes whatever page you go to when you navigate back to it from the suggestions in your address bar:
But the wiki considers
folding@homeandfolding%40hometo be different pages!The page title should probably be urldecoded before we try to fetch the page content from the database.
This chaneg could either be made here, in the page view action:
classic/wiki/src/actions/view.php
Lines 3 to 7 in de8d455
Or it could be done in the index.php file as soon as the path variable is defined:
classic/wiki/index.php
Lines 54 to 58 in a9d212f
One caveat to adding urldecoding at that point will be the need to change the way page redirects work:
classic/wiki/index.php
Lines 84 to 90 in a9d212f