original_string: protected function sanitizeUrl($url)
  	{
  		$url = $url;
  		$url = preg_replace('~[^\\pL0-9_]+~u', '-', $url); // substitutes anything but letters, numbers and '_' with separator
  		$url = trim($url, "-");
  		$url = iconv("utf-8", "us-ascii//TRANSLIT", $url); // TRANSLIT does the whole job
  		$url = strtolower($url);
  		$url = preg_replace('~[^-a-z0-9_]+~', '', $url); // keep only letters, numbers, '_' and separator
  		return $url;
  	}
code: protected function sanitizeUrl($url)
  	{
  		$url = $url;
  		$url = preg_replace('~[^\\pL0-9_]+~u', '-', $url); // substitutes anything but letters, numbers and '_' with separator
  		$url = trim($url, "-");
  		$url = iconv("utf-8", "us-ascii//TRANSLIT", $url); // TRANSLIT does the whole job
  		$url = strtolower($url);
  		$url = preg_replace('~[^-a-z0-9_]+~', '', $url); // keep only letters, numbers, '_' and separator
  		return $url;
  	}
code_tokens: protected function sanitizeUrl ( $ url ) { $ url = $ url ; $ url = preg_replace ( '~[^\\pL0-9_]+~u' , '-' , $ url ) ; // substitutes anything but letters, numbers and '_' with separator $ url = trim ( $ url , "-" ) ; $ url = iconv ( "utf-8" , "us-ascii//TRANSLIT" , $ url ) ; // TRANSLIT does the whole job $ url = strtolower ( $ url ) ; $ url = preg_replace ( '~[^-a-z0-9_]+~' , '' , $ url ) ; // keep only letters, numbers, '_' and separator return $ url ; }
docstring: Function for sanitizing slugs
docstring_tokens: Function for sanitizing slugs