From 3de663abf6c21a7b2d3c11cffa72fdaea346be9b Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Sat, 16 Oct 2004 07:15:18 +0000 Subject: [PATCH] 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) --- includes/Title.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 = ''; -- 2.20.1