diff --git a/app/classes/Framadate/Utils.php b/app/classes/Framadate/Utils.php index 250528b..3565a70 100644 --- a/app/classes/Framadate/Utils.php +++ b/app/classes/Framadate/Utils.php @@ -104,6 +104,9 @@ class Utils { * @return string The poll's URL. */ public static function getUrlSondage($id, $admin = false, $vote_id = '', $action = null, $action_value = null) { + // URL-Encode $action_value + $action_value = $action_value == null ? null : urlencode($action_value); + if (URL_PROPRE) { if ($admin === true) { $url = self::get_server_name() . $id . '/admin'; diff --git a/app/inc/smarty.php b/app/inc/smarty.php index c265bf1..7dfb2a4 100644 --- a/app/inc/smarty.php +++ b/app/inc/smarty.php @@ -49,7 +49,7 @@ function smarty_function_poll_url($params, Smarty_Internal_Template $template) { $poll_id = filter_var($params['id'], FILTER_VALIDATE_REGEXP, ['options' => ['regexp' => POLL_REGEX]]); $admin = (isset($params['admin']) && $params['admin']) ? true : false; $action = (isset($params['action']) && !empty($params['action'])) ? Utils::htmlEscape($params['action']) : false; - $action_value = (isset($params['action_value']) && !empty($params['action_value'])) ? Utils::htmlEscape($params['action_value']) : false; + $action_value = (isset($params['action_value']) && !empty($params['action_value'])) ? $params['action_value'] : false; $vote_unique_id = isset($params['vote_id']) ? filter_var($params['vote_id'], FILTER_VALIDATE_REGEXP, ['options' => ['regexp' => POLL_REGEX]]) : ''; // If filter_var fails (i.e.: hack tentative), it will return false. At least no leak is possible from this. diff --git a/tpl/part/vote_table_classic.tpl b/tpl/part/vote_table_classic.tpl index cb01b08..20fe885 100644 --- a/tpl/part/vote_table_classic.tpl +++ b/tpl/part/vote_table_classic.tpl @@ -14,7 +14,7 @@ {foreach $slots as $id=>$slot} - {__('Generic', 'Remove')} diff --git a/tpl/part/vote_table_date.tpl b/tpl/part/vote_table_date.tpl index 029e11f..7bd6781 100644 --- a/tpl/part/vote_table_date.tpl +++ b/tpl/part/vote_table_date.tpl @@ -17,7 +17,7 @@ {foreach $slots as $slot} {foreach $slot->moments as $id=>$moment} - {__('Generic', 'Remove')}