From 556a9fc9df8b22669f209fbbc741bcc052a0f7e0 Mon Sep 17 00:00:00 2001 From: mohrt Date: Tue, 10 Dec 2002 15:20:09 +0000 Subject: [PATCH] escape html entities in the option values and output --- NEWS | 1 + libs/plugins/function.html_options.php | 7 ++++--- plugins/function.html_options.php | 7 ++++--- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/NEWS b/NEWS index 2508f4e6..df466fe5 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,4 @@ + - escape html entities in html_options (Monte) - fixed bug with label for html_options (Monte) - added caching to config file loading (Monte) - added "extra" parameter to mailto function (Monte, diff --git a/libs/plugins/function.html_options.php b/libs/plugins/function.html_options.php index e68f6c93..ed5d06f6 100644 --- a/libs/plugins/function.html_options.php +++ b/libs/plugins/function.html_options.php @@ -43,10 +43,11 @@ function smarty_function_html_options($params, &$smarty) function smarty_function_html_options_optoutput($key, $value, $selected) { if(!is_array($value)) { - $html_result = "\n"; + $optgroup_html = '' . "\n"; foreach ($values as $key => $value) { $optgroup_html .= smarty_function_html_options_optoutput($key, $value, $selected); } diff --git a/plugins/function.html_options.php b/plugins/function.html_options.php index e68f6c93..ed5d06f6 100644 --- a/plugins/function.html_options.php +++ b/plugins/function.html_options.php @@ -43,10 +43,11 @@ function smarty_function_html_options($params, &$smarty) function smarty_function_html_options_optoutput($key, $value, $selected) { if(!is_array($value)) { - $html_result = "\n"; + $optgroup_html = '' . "\n"; foreach ($values as $key => $value) { $optgroup_html .= smarty_function_html_options_optoutput($key, $value, $selected); }