diff options
Diffstat (limited to 'src/Security.php')
-rw-r--r-- | src/Security.php | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/Security.php b/src/Security.php index b2042fd..c825994 100644 --- a/src/Security.php +++ b/src/Security.php | |||
@@ -19,8 +19,8 @@ class Security | |||
19 | // faire qu'un certain élément puisse n'avoir que certains attributs, regarder la doc | 19 | // faire qu'un certain élément puisse n'avoir que certains attributs, regarder la doc |
20 | private static $specHtmLawed = ''; | 20 | private static $specHtmLawed = ''; |
21 | 21 | ||
22 | // ATTENTION, n'applique pas htmlspecialchars() !! | 22 | // obtenir du HTML non dangereur sans appliquer htmlspecialchars |
23 | public static function secureString(string $chaine): string | 23 | public static function secureHTML(string $chaine): string |
24 | { | 24 | { |
25 | return trim(htmLawed($chaine, self::$configHtmLawed, self::$specHtmLawed)); | 25 | return trim(htmLawed($chaine, self::$configHtmLawed, self::$specHtmLawed)); |
26 | } | 26 | } |
@@ -80,13 +80,6 @@ class Security | |||
80 | } | 80 | } |
81 | } | 81 | } |
82 | 82 | ||
83 | // erreurs à la création des mots de passe | ||
84 | function removeSpacesTabsCRLF(string $chaine): string | ||
85 | { | ||
86 | $cibles = [' ', "\t", "\n", "\r"]; // doubles quotes !! | ||
87 | return(str_replace($cibles, '', $chaine)); | ||
88 | } | ||
89 | |||
90 | // lien sans http:// | 83 | // lien sans http:// |
91 | function fixLinks($data) | 84 | function fixLinks($data) |
92 | { | 85 | { |