Changeset 6060 for trunk/include
- Timestamp:
- May 4, 2010, 1:31:42 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/functions.inc.php
r6025 r6060 382 382 function str2url($str) 383 383 { 384 $raw = $str; 385 384 386 $str = remove_accents($str); 385 387 $str = preg_replace('/[^a-z0-9_\s\'\:\/\[\],-]/','',strtolower($str)); 386 388 $str = preg_replace('/[\s\'\:\/\[\],-]+/',' ',trim($str)); 387 389 $res = str_replace(' ','_',$str); 390 391 if (empty($res)) 392 { 393 $res = $raw; 394 } 388 395 389 396 return $res;
Note: See TracChangeset
for help on using the changeset viewer.