summaryrefslogtreecommitdiff
path: root/Core/Functions/func_sanitize.php
diff options
context:
space:
mode:
authorDebulois <quentin@debulois.fr>2022-03-31 14:56:45 +0200
committerDebulois <quentin@debulois.fr>2022-03-31 14:56:45 +0200
commitb637d625216e50602d0bde8a544c281ca00af5fa (patch)
tree5e44ad1048f8a3583cc854fe3bc21086ede4d88a /Core/Functions/func_sanitize.php
parentc9d4c87b21f1050a780f5296961d24bd17c9cdc8 (diff)
Grosse maj encore avec ajout de fonctionnalités dans l'admin principalement et grosse remise en page / rennomage et preparation pour retravailler le CSS
Diffstat (limited to 'Core/Functions/func_sanitize.php')
-rw-r--r--Core/Functions/func_sanitize.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/Core/Functions/func_sanitize.php b/Core/Functions/func_sanitize.php
new file mode 100644
index 0000000..afee91c
--- /dev/null
+++ b/Core/Functions/func_sanitize.php
@@ -0,0 +1,17 @@
+<?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;
+}
+
+?> \ No newline at end of file