diff options
| author | Debulois <quentin@debulois.fr> | 2022-02-03 13:02:21 +0100 |
|---|---|---|
| committer | Debulois <quentin@debulois.fr> | 2022-02-03 13:02:21 +0100 |
| commit | 5ddf8de3691fde866c5a48b440cffa2990b2014c (patch) | |
| tree | e19215cb4a699ed767c731f65d3f796b4435530a /Wrapper/Functions/func_sanitize.php | |
Initial commit
Diffstat (limited to 'Wrapper/Functions/func_sanitize.php')
| -rw-r--r-- | Wrapper/Functions/func_sanitize.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Wrapper/Functions/func_sanitize.php b/Wrapper/Functions/func_sanitize.php new file mode 100644 index 0000000..2821413 --- /dev/null +++ b/Wrapper/Functions/func_sanitize.php @@ -0,0 +1,12 @@ +<?php +// **************************************************************************** +// Description: Fonction simple pour nettoyer un peu la data +// **************************************************************************** +function sanitize($data) { + // Retrait des espaces en début et fin de la variable. + $trimmed = trim($data); + // Retrait des charactères HTML. + $htmlChars = htmlspecialchars($trimmed); + return $htmlChars; +} +?>
\ No newline at end of file |
