- Simplified SLUG() method of the UrlExtension, since it was way too slow
This commit is contained in:
		
							parent
							
								
									08211282c2
								
							
						
					
					
						commit
						2dc16de7c3
					
				| @ -126,7 +126,7 @@ PATTERN; | ||||
|     # src: https://stackoverflow.com/a/14550919
 | ||||
|     public static function slug(string $text, string $separator = '-') : string | ||||
|     { | ||||
|         $clean = iconv('UTF-8', 'ASCII//TRANSLIT', $text); | ||||
|         $clean = iconv('UTF-8', 'ASCII//TRANSLIT//IGNORE', $text); | ||||
|         $clean = preg_replace("/[^a-zA-Z0-9\/_| -]/", '', $clean); | ||||
| 
 | ||||
|         return preg_replace("/[\/_| -]+/", $separator, strtolower(trim($clean, '-'))); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user