diff options
Diffstat (limited to 'controller/ckeditor.php')
-rw-r--r-- | controller/ckeditor.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/controller/ckeditor.php b/controller/ckeditor.php index 1707128..d0c5824 100644 --- a/controller/ckeditor.php +++ b/controller/ckeditor.php | |||
@@ -18,8 +18,9 @@ function preparationCKeditor($html) | |||
18 | header('Location: index.php?erreur=empty_input'); | 18 | header('Location: index.php?erreur=empty_input'); |
19 | } | 19 | } |
20 | 20 | ||
21 | // supprimer espaces, tabulations et sauts de ligne en début et fin de chaine | 21 | // sécuriser le HTML |
22 | $html = trim($html); | 22 | require('controller/Security.php'); |
23 | $html = Security::secureString($html); | ||
23 | 24 | ||
24 | // supprimer les sauts de ligne | 25 | // supprimer les sauts de ligne |
25 | $sautsDeLigne = array("\n", "\r", "\r\n"); | 26 | $sautsDeLigne = array("\n", "\r", "\r\n"); |
@@ -58,7 +59,7 @@ function getFileCodeFromHTTPReferrer(): string | |||
58 | function submitCKeditor() | 59 | function submitCKeditor() |
59 | { | 60 | { |
60 | // déjà fait mais on ne sait jamais | 61 | // déjà fait mais on ne sait jamais |
61 | if(!isset($_SESSION['admin']) || $_SESSION['admin'] != 1) | 62 | if(!isset($_SESSION)) |
62 | { | 63 | { |
63 | header('Location: index.php?page=' . $_GET['page'] . '&erreur=connexion'); | 64 | header('Location: index.php?page=' . $_GET['page'] . '&erreur=connexion'); |
64 | exit(); | 65 | exit(); |