protected static function cleanURL($string, $delimiter = "-")
{
if (fusion_get_settings("normalize_seo") == "1") {
$string = self::normalize($string);
if (function_exists('iconv')) {
$string = iconv("UTF-8", "ASCII//TRANSLIT//IGNORE", $string);
}
}
$string = str_replace("&", "&", $string);
// Must Support &
//$string = preg_replace("/&([^;]+);/i", "", $string); // Remove all Special entities like ', &#copy;
//$string = preg_replace("/[^+a-zA-Z0-9_.\/#|+ -\W]/i", "",$string); // # is allowed in some cases(like in threads for #post_10)
$string = preg_replace("/[\\s]+/i", $delimiter, $string);
// Replace All <space> by Delimiter
$string = preg_replace("/[\\" . $delimiter . "]+/i", $delimiter, $string);
// Replace multiple occurences of Delimiter by 1 occurence only
//$string = trim($string, "-");
return (string) $string;
}