summaryrefslogtreecommitdiff
path: root/Wrapper/Functions/func_sanitize.php
blob: cd45c286a6f23573215cbe1efc136252654e77d7 (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 (XSS).
    $htmlChars = htmlspecialchars($trimmed);
    return $htmlChars;
}
?>