Project

General

Profile

« Previous | Next » 

Revision 841

Added by thorn over 16 years ago

fixed file-naming issue when old page-names (from before 2.7) contains "&"

View differences:

functions.php
381 381
	//init utf8-functions
382 382
	init_utf8funcs();
383 383
	$string = entities_to_7bit($string);
384
	// Now replace spaces with page spcacer
385
	$string = trim($string);
386
	$string = preg_replace('/(\s)+/', PAGE_SPACER, $string);
387 384
	// Now remove all bad characters
388 385
	$bad = array(
389 386
	'\'', /* /  */ '"', /* " */	'<', /* < */	'>', /* > */
......
394 391
	';', /* ; */	':', /* : */	',', /* , */	'?' /* ? */
395 392
	);
396 393
	$string = str_replace($bad, '', $string);
394
	// Now replace spaces with page spcacer
395
	$string = trim($string);
396
	$string = preg_replace('/(\s)+/', PAGE_SPACER, $string);
397 397
	// Now convert to lower-case
398 398
	$string = strtolower($string);
399 399
	// If there are any weird language characters, this will protect us against possible problems they could cause

Also available in: Unified diff