From 6a300fabcfd6756db01c90553a793a733ac54b0d Mon Sep 17 00:00:00 2001 From: Aryeh Gregor Date: Thu, 20 Mar 2008 17:04:32 +0000 Subject: [PATCH] I knew there was a better way. Use makeTitleSafe for this too. --- includes/Category.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/Category.php b/includes/Category.php index 37127d5484..d9a09fea7c 100644 --- a/includes/Category.php +++ b/includes/Category.php @@ -50,7 +50,7 @@ abstract class CategoryListBase { * @return mixed Normalized name, or false if the name was invalid. */ private static function setNamesCallback( $name ) { - $title = Title::newFromText( "Category:$name" ); + $title = Title::makeTitleSafe( NS_CATEGORY, $name ); if( !is_object( $title ) ) { return false; } -- 2.20.1