mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-10 19:41:26 +01:00
Fix: evite erreur si champ mal renseign
This commit is contained in:
@@ -2684,6 +2684,8 @@ function dol_entity_decode($StringHtml)
|
||||
*/
|
||||
function clean_url($url,$http=1)
|
||||
{
|
||||
if (eregi('^(http(s)?:[\\\/]+)?[0-9A-Z-]+\.([0-9A-Z-]+\.)+[A-Z]{2,4}(:[0-9]+)?',$url))
|
||||
{
|
||||
//Todo: voir plus tard pour les url avec accent
|
||||
$url = unaccent(trim($url));
|
||||
|
||||
@@ -2698,6 +2700,7 @@ function clean_url($url,$http=1)
|
||||
$url = eregi_replace($regs[0],strtolower($regs[0]),$url);
|
||||
|
||||
return $url;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user