From: Gabriel Wicke Date: Thu, 27 May 2004 12:17:34 +0000 (+0000) Subject: add % to legal chars, fixes diff views with urlencoded chars in ?title=xy%z or titles... X-Git-Tag: 1.5.0alpha1~3189 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=fddee5f3fab96f42dd26e8bc70fa87b15d87a979;p=lhc%2Fweb%2Fwiklou.git add % to legal chars, fixes diff views with urlencoded chars in ?title=xy%z or titles like %s --- diff --git a/includes/Title.php b/includes/Title.php index 966c6d274e..86262db122 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -182,11 +182,12 @@ class Title { # Missing characters: # * []|# Needed for link syntax # * % and + are corrupted by Apache when they appear in the path + # * % seems to work though # # Theoretically 0x80-0x9F of ISO 8859-1 should be disallowed, but # this breaks interlanguage links - $set = " !\"$&'()*,\\-.\\/0-9:;<=>?@A-Z\\\\^_`a-z{}~\\x80-\\xFF"; + $set = " %!\"$&'()*,\\-.\\/0-9:;<=>?@A-Z\\\\^_`a-z{}~\\x80-\\xFF"; return $set; } @@ -638,6 +639,7 @@ class Title { # Initialisation if ( $imgpre === false ) { $imgpre = ":" . $wgLang->getNsText( Namespace::getImage() ) . ":"; + # % is needed as well $rxTc = "/[^" . Title::legalChars() . "]/"; }