# HG changeset patch # User Dan # Date 1182908986 14400 # Node ID 9ecc94c4c7f5eeff90279be638862c996bba6d45 # Parent 320acf0772766d6e3667c1aaee1fb0505ad18211 Fixed tons of bugs relating to non-templated pages diff -r 320acf077276 -r 9ecc94c4c7f5 includes/pageprocess.php --- a/includes/pageprocess.php Tue Jun 26 21:03:02 2007 -0400 +++ b/includes/pageprocess.php Tue Jun 26 21:49:46 2007 -0400 @@ -134,6 +134,16 @@ $this->err_access_denied(); return false; } + $pathskey = $paths->nslist[ $this->namespace ] . $this->page_id; + $strict_no_headers = false; + if ( isset($paths->pages[$pathskey]) ) + { + if ( $paths->pages[$pathskey]['special'] == 1 ) + { + $this->send_headers = false; + $strict_no_headers = true; + } + } if ( $this->namespace == 'Special' || $this->namespace == 'Admin' ) { if ( !$this->page_exists ) @@ -217,7 +227,7 @@ } else { - $this->render(); + $this->render( (!$strict_no_headers) ); } } } @@ -287,15 +297,15 @@ * @access private */ - function render() + function render($incl_inner_headers = true) { $text = $this->fetch_text(); $this->header(); - // if ( $this->send_headers ) - // { + if ( $incl_inner_headers ) + { display_page_headers(); - // } + } if ( $this->revision_id ) { @@ -306,10 +316,10 @@ // echo('
'.htmlspecialchars($text).''); eval ( $text ); - // if ( $this->send_headers ) - // { + if ( $incl_inner_headers ) + { display_page_footers(); - // } + } $this->footer(); } diff -r 320acf077276 -r 9ecc94c4c7f5 includes/render.php --- a/includes/render.php Tue Jun 26 21:03:02 2007 -0400 +++ b/includes/render.php Tue Jun 26 21:49:46 2007 -0400 @@ -597,10 +597,9 @@ $can_do_php = ( $session->get_permissions('php_in_pages') && !$strip_all_php ); - $text = sanitize_html($text, ( !$can_do_php )); - if ( !$can_do_php ) { + $text = sanitize_html($text, true); // If we can't do PHP, we can't do Javascript either. $text = RenderMan::destroy_javascript($text); } diff -r 320acf077276 -r 9ecc94c4c7f5 includes/wikiengine/Tables.php --- a/includes/wikiengine/Tables.php Tue Jun 26 21:03:02 2007 -0400 +++ b/includes/wikiengine/Tables.php Tue Jun 26 21:49:46 2007 -0400 @@ -982,13 +982,13 @@ */ function decodeCharReferencesCallback( $matches ) { if( $matches[1] != '' ) { - return Sanitizer::decodeEntity( $matches[1] ); + return decodeEntity( $matches[1] ); } elseif( $matches[2] != '' ) { - return Sanitizer::decodeChar( intval( $matches[2] ) ); + return decodeChar( intval( $matches[2] ) ); } elseif( $matches[3] != '' ) { - return Sanitizer::decodeChar( hexdec( $matches[3] ) ); + return decodeChar( hexdec( $matches[3] ) ); } elseif( $matches[4] != '' ) { - return Sanitizer::decodeChar( hexdec( $matches[4] ) ); + return decodeChar( hexdec( $matches[4] ) ); } # Last case should be an ampersand by itself return $matches[0];