From 892fa11373bd0781b7916a6c97d7f354ba51f428 Mon Sep 17 00:00:00 2001 From: Olivier PEREZ <olivier@olivierperez.fr> Date: Mon, 5 Oct 2015 23:59:43 +0200 Subject: [PATCH] Don't allow ',' in slot labels --- adminstuds.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/adminstuds.php b/adminstuds.php index ac3661dc..388d9c2d 100644 --- a/adminstuds.php +++ b/adminstuds.php @@ -394,12 +394,12 @@ if (isset($_GET['add_slot'])) { if (isset($_POST['confirm_add_slot'])) { if ($poll->format === 'D') { $newdate = strip_tags($_POST['newdate']); - $newmoment = strip_tags($_POST['newmoment']); + $newmoment = str_replace(',', '-', strip_tags($_POST['newmoment'])); $ex = explode('/', $newdate); $result = $adminPollService->addDateSlot($poll_id, mktime(0, 0, 0, $ex[1], $ex[0], $ex[2]), $newmoment); } else { - $newslot = strip_tags($_POST['choice']); + $newslot = str_replace(',', '-', strip_tags($_POST['choice'])); $result = $adminPollService->addClassicSlot($poll_id, $newslot); } -- GitLab