From fddee5f3fab96f42dd26e8bc70fa87b15d87a979 Mon Sep 17 00:00:00 2001 From: Gabriel Wicke Date: Thu, 27 May 2004 12:17:34 +0000 Subject: [PATCH] add % to legal chars, fixes diff views with urlencoded chars in ?title=xy%z or titles like %s --- includes/Title.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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() . "]/"; } -- 2.20.1