mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-11 12:01:23 +01:00
Fix: nettoyage du champ url
This commit is contained in:
@@ -2667,6 +2667,21 @@ function dol_entity_decode($StringHtml)
|
|||||||
return $DecodeString;
|
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
|
\brief Supprime le code html
|
||||||
\param string StringHtml
|
\param string StringHtml
|
||||||
|
|||||||
@@ -301,7 +301,7 @@ class Societe
|
|||||||
$this->fax = ereg_replace(" ","",$this->fax);
|
$this->fax = ereg_replace(" ","",$this->fax);
|
||||||
$this->fax = ereg_replace("\.","",$this->fax);
|
$this->fax = ereg_replace("\.","",$this->fax);
|
||||||
$this->email=trim($this->email);
|
$this->email=trim($this->email);
|
||||||
$this->url=trim($this->url);
|
$this->url=clean_url($this->url);
|
||||||
$this->siren=trim($this->siren);
|
$this->siren=trim($this->siren);
|
||||||
$this->siret=trim($this->siret);
|
$this->siret=trim($this->siret);
|
||||||
$this->ape=trim($this->ape);
|
$this->ape=trim($this->ape);
|
||||||
|
|||||||
Reference in New Issue
Block a user