summaryrefslogtreecommitdiff
path: root/Wrapper/Functions/func_sanitize.php
blob: 2821413de84247154a235b386ae9a936df7408a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
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;
}
?>