From: Brion Vibber Date: Fri, 16 May 2003 13:36:37 +0000 (+0000) Subject: Don't allow high control chars in titles on non-utf8 wikis X-Git-Tag: 1.1.0~557 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/%7B%7B%20url_for%28%27admin_users%27%29%20%7D%7D?a=commitdiff_plain;h=8137de557479b9b506e539f377efd91ffd151df4;p=lhc%2Fweb%2Fwiklou.git Don't allow high control chars in titles on non-utf8 wikis --- diff --git a/includes/Title.php b/includes/Title.php index 9c0f6d27db..e171eb574a 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -68,7 +68,13 @@ class Title { function legalChars() { - return "-,.()' &;%!?_0-9A-Za-z\\/:\\x80-\\xFF"; + global $wgInputEncoding; + if( $wgInputEncoding == "utf-8" ) { + return "-,.()' &;%!?_0-9A-Za-z\\/:\\x80-\\xFF"; + } else { + # ISO 8859-* don't allow 0x80-0x9F + return "-,.()' &;%!?_0-9A-Za-z\\/:\\xA0-\\xFF"; + } } function getInterwikiLink( $key )