Fixed bug where page file was not loaded because of urlencoding/urldecoding

This commit is contained in:
Andrew Manning 2016-05-29 13:50:32 -04:00
parent df7772e301
commit 75b169f391

View File

@ -219,7 +219,7 @@ function wiki_get_page_content($arr) {
if (!$w['path']) { if (!$w['path']) {
return array('content' => null, 'message' => 'Error reading wiki', 'success' => false); return array('content' => null, 'message' => 'Error reading wiki', 'success' => false);
} }
$page_path = $w['path'].'/'.$page; $page_path = $w['path'].'/'.escape_tags(urlencode($page));
if (is_readable($page_path) === true) { if (is_readable($page_path) === true) {
if(filesize($page_path) === 0) { if(filesize($page_path) === 0) {
$content = ''; $content = '';