Fix: nettoyage du champ url

This commit is contained in:
Regis Houssin
2007-09-17 13:47:15 +00:00
parent ab02ba0d0f
commit 8093b0f7b5
2 changed files with 16 additions and 1 deletions

View File

@@ -2667,6 +2667,21 @@ function dol_entity_decode($StringHtml)
return $DecodeString;
}
/**
\brief Nettoie une url
\param string url
\return string CleanUrl
*/
function clean_url($url)
{
//Todo: voir plus tard pour les url avec accent
$url = unaccent(trim($url));
$url = strtolower($url);
//Todo: voir pour am<61>liorer
$url = ereg_replace('^http://','',$url);
return $url;
}
/**
\brief Supprime le code html
\param string StringHtml