diff options
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 |
