includes/pageprocess.php
changeset 92 aa8ffe41d1c4
parent 91 8079b0288e8e
child 93 95c4d91bd954
--- a/includes/pageprocess.php	Tue Aug 14 15:13:40 2007 -0400
+++ b/includes/pageprocess.php	Tue Aug 14 20:48:29 2007 -0400
@@ -935,6 +935,7 @@
   
   function _handle_redirect($page_id, $namespace)
   {
+    global $db, $session, $paths, $template, $plugins; // Common objects
     $arr_pid = array($this->page_id, $this->namespace);
     if ( $namespace == 'Special' || $namespace == 'Admin' )
     {
@@ -944,7 +945,7 @@
     {
       return 'This page infinitely redirects with another page (or another series of pages), and the infinite redirect was trapped.';
     }
-    $page_id_key = $paths->nslist[ $namespace ] . $page_id;
+    $page_id_key = $paths->nslist[ $namespace ] . sanitize_page_id($page_id);
     if ( !isset($paths->pages[$page_id_key]) )
     {
       return 'This page redirects to another page that doesn\'t exist.';