From: Brion Vibber Date: Thu, 11 Dec 2003 18:39:03 +0000 (+0000) Subject: Put the illegal char check down below again, to fix breakage to # links X-Git-Tag: 1.3.0beta1~1259 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/operations/?a=commitdiff_plain;h=ebed7292660ed2caeb4cadaf6c0031a91914f522;p=lhc%2Fweb%2Fwiklou.git Put the illegal char check down below again, to fix breakage to # links --- diff --git a/includes/Title.php b/includes/Title.php index 3639be9210..d0300ed4cc 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -401,12 +401,6 @@ class Title { $this->mInterwiki = $this->mFragment = ""; $this->mNamespace = 0; - # Reject illegal characters. - # - if( preg_match( $rxTc, $this->mDbkeyform ) ) { - return false; - } - # Clean up whitespace # $t = preg_replace( "/[\\s_]+/", "_", $this->mDbkeyform ); @@ -464,8 +458,13 @@ class Title { $r = substr( $r, 0, strlen( $r ) - strlen( $f ) ); } - $t = $r; - if( $this->mInterwiki == "") $t = $wgLang->ucfirst( $t ); + # Reject illegal characters. + # + if( preg_match( $rxTc, $r ) ) { + return false; + } + + if( $this->mInterwiki == "") $t = $wgLang->ucfirst( $r ); $this->mDbkeyform = $t; $this->mUrlform = wfUrlencode( $t ); $this->mTextform = str_replace( "_", " ", $t );