diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/functions.inc.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/functions.inc.php b/include/functions.inc.php index e44421fdb..dc87f508c 100644 --- a/include/functions.inc.php +++ b/include/functions.inc.php @@ -381,11 +381,18 @@ function remove_accents($string) */ function str2url($str) { + $raw = $str; + $str = remove_accents($str); $str = preg_replace('/[^a-z0-9_\s\'\:\/\[\],-]/','',strtolower($str)); $str = preg_replace('/[\s\'\:\/\[\],-]+/',' ',trim($str)); $res = str_replace(' ','_',$str); + if (empty($res)) + { + $res = $raw; + } + return $res; } |