From ddcd30be99aa5cd9f7d409719e8ef32dfd4fb93d Mon Sep 17 00:00:00 2001 From: messju Date: Mon, 17 Mar 2003 16:36:02 +0000 Subject: [PATCH] html_options passthru all unknown paramters now --- NEWS | 1 + libs/plugins/function.html_options.php | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index b279dfdd..4c474824 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,4 @@ + - html_options passthru all unknown paramters now - fix link functionality of html_image, also make output XHTML compatible (Hinrich Donner, Monte) - append "@" to default modifier vars/args diff --git a/libs/plugins/function.html_options.php b/libs/plugins/function.html_options.php index aada4bbc..30477e21 100644 --- a/libs/plugins/function.html_options.php +++ b/libs/plugins/function.html_options.php @@ -35,8 +35,17 @@ function smarty_function_html_options($params, &$smarty) } } + /* passthru all unknown params to $extra */ + $extra = ''; + unset($params['values']); + unset($params['output']); + unset($params['selected']); + unset($params['options']); + unset($params['name']); + foreach ($params as $key=>$value) $extra .= ' ' . $key . '="'. htmlspecialchars($value) . '"'; + if(!empty($name)) { - $html_result = '' . "\n"; + $html_result = '' . "\n"; } return $html_result; }