Fix last commit: purge() issue

This commit is contained in:
Michael Foster 2013-07-31 02:19:58 -04:00
parent 42cba53887
commit b22bcdecf9

View File

@ -366,6 +366,11 @@ function boardTitle($uri) {
function purge($uri) { function purge($uri) {
global $config, $debug; global $config, $debug;
// Fix for Unicode
$uri = urlencode($uri);
$uri = str_replace("%2F", "/", $uri);
$uri = str_replace("%3A", ":", $uri);
if (preg_match($config['referer_match'], $config['root']) && isset($_SERVER['REQUEST_URI'])) { if (preg_match($config['referer_match'], $config['root']) && isset($_SERVER['REQUEST_URI'])) {
$uri = (str_replace('\\', '/', dirname($_SERVER['REQUEST_URI'])) == '/' ? '/' : str_replace('\\', '/', dirname($_SERVER['REQUEST_URI'])) . '/') . $uri; $uri = (str_replace('\\', '/', dirname($_SERVER['REQUEST_URI'])) == '/' ? '/' : str_replace('\\', '/', dirname($_SERVER['REQUEST_URI'])) . '/') . $uri;
} else { } else {