Index: trunk/CHANGELOG
===================================================================
--- trunk/CHANGELOG	(revision 840)
+++ trunk/CHANGELOG	(revision 841)
@@ -11,6 +11,8 @@
 ! = Update/Change
 
 ------------------------------------- 2.7.1 -------------------------------------
+01-May-2008 Thomas Hornik
+#	fixed file-naming issue when old page-names (from before 2.7) contains "&"
 26-Apr-2008 Thomas Hornik
 #	class.admin.php deletes actual query-string while redirection. fixed.
 25-Apr-2008 Matthias Gallas
Index: trunk/wb/framework/functions.php
===================================================================
--- trunk/wb/framework/functions.php	(revision 840)
+++ trunk/wb/framework/functions.php	(revision 841)
@@ -381,9 +381,6 @@
 	//init utf8-functions
 	init_utf8funcs();
 	$string = entities_to_7bit($string);
-	// Now replace spaces with page spcacer
-	$string = trim($string);
-	$string = preg_replace('/(\s)+/', PAGE_SPACER, $string);
 	// Now remove all bad characters
 	$bad = array(
 	'\'', /* /  */ '"', /* " */	'<', /* < */	'>', /* > */
@@ -394,6 +391,9 @@
 	';', /* ; */	':', /* : */	',', /* , */	'?' /* ? */
 	);
 	$string = str_replace($bad, '', $string);
+	// Now replace spaces with page spcacer
+	$string = trim($string);
+	$string = preg_replace('/(\s)+/', PAGE_SPACER, $string);
 	// Now convert to lower-case
 	$string = strtolower($string);
 	// If there are any weird language characters, this will protect us against possible problems they could cause
