public static function clean_url( $string, $sep = null ) 
	{
		// basic clean
		$string = strtolower( static::replace_accents( trim( $string ) ) );

		// these characters get replaced with our seperator
		$string = str_replace( array( ' ', '&', '\r\n', '\n', '+', ',', '.', '_' ) , '-', $string );

		$string = preg_replace( array(
			'/[^a-z0-9\-]/', // remove non alphanumerics
			'/[\-]+/', // only allow one in a row
		), array( '', '-' ), $string );

		// custom seperator
		if ( !is_null( $sep ) ) {
			$string = str_replace( '-', $sep, $string );
		}

		// trim the result again
		return trim( $string, '-' );
	}