From: Brion Vibber Date: Sat, 16 Oct 2004 07:15:18 +0000 (+0000) Subject: Reject titles with %XX hex codes (since these have special meaning in URL links and... X-Git-Tag: 1.5.0alpha1~1530 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=3de663abf6c21a7b2d3c11cffa72fdaea346be9b;p=lhc%2Fweb%2Fwiklou.git Reject titles with %XX hex codes (since these have special meaning in URL links and are interpreted for this purpose, breaking things if they're used literally) --- diff --git a/includes/Title.php b/includes/Title.php index ef1155375d..3924085c5b 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -979,7 +979,7 @@ class Title { if ( $imgpre === false ) { $imgpre = ':' . $wgContLang->getNsText( Namespace::getImage() ) . ':'; # % is needed as well - $rxTc = '/[^' . Title::legalChars() . ']/'; + $rxTc = '/[^' . Title::legalChars() . ']|%[0-9A-Fa-f]{2}/'; } $this->mInterwiki = $this->mFragment = '';