From b680ea06a64290b3e28a7b7d2d8d33373a3e6709 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 25 Sep 2011 09:54:17 +0200 Subject: fix namespace cleaning FS#2295 This patch applies the correct pagename cleaning to namespaces as well. Namespaces should follow the same rules as pagenames but due to a bug it was possible to have namespaces ending in a underscore. If you used such a namespace it will be inaccessible after applying this patch. You should rename the namespace directory on the filesystem (removing the trailing underscore). You old links will then work automatically again. Rebuilding the search index is recommended. --- inc/pageutils.php | 1 + 1 file changed, 1 insertion(+) (limited to 'inc/pageutils.php') diff --git a/inc/pageutils.php b/inc/pageutils.php index 81dcb66e7..31b5f9ff9 100644 --- a/inc/pageutils.php +++ b/inc/pageutils.php @@ -134,6 +134,7 @@ function cleanID($raw_id,$ascii=false,$media=false){ $id = preg_replace('#:+#',':',$id); $id = ($media ? trim($id,':.-') : trim($id,':._-')); $id = preg_replace('#:[:\._\-]+#',':',$id); + $id = preg_replace('#[:\._\-]+:#',':',$id); $cache[(string)$raw_id] = $id; return($id); -- cgit v1.2.3