From 8137de557479b9b506e539f377efd91ffd151df4 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 16 May 2003 13:36:37 +0000 Subject: [PATCH] Don't allow high control chars in titles on non-utf8 wikis --- includes/Title.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 ) -- 2.20.1