From bbf50ae1ffa5b1b3b71f0e57d658d9beaaa50de0 Mon Sep 17 00:00:00 2001 From: polo Date: Tue, 14 Jan 2025 23:53:17 +0100 Subject: meilleur filtrage upload AJAX --- index.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index 9beed23..1ece14f 100644 --- a/index.php +++ b/index.php @@ -2,20 +2,17 @@ // index.php require 'src/integration/ckeditor5/config.php'; -require 'src/integration/ckeditor5/init.php'; +require $ckeditor_integration_path . 'init.php'; makeTranslationSymLink(); // routage // upload images AJAX -if(isset($_GET['action']) && $_GET['action'] === 'upload_image') // image insérée dans l'éditeur => requête AJAX -{ - require $ckeditor_integration_path . 'image_upload.php'; -} +require $ckeditor_integration_path . 'image_upload.php'; // submit normal -elseif(isset($_GET['action']) && $_GET['action'] === 'submit') // HTML envoyé par l'éditeur +if(isset($_GET['action']) && $_GET['action'] === 'submit') // HTML envoyé par l'éditeur { require $ckeditor_integration_path . 'clean_html.php'; $html_from_editor = getAndCleanEditorOutput(); // manipule $_POST['contenu']; -- cgit v1.2.3