mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 19:04:27 +02:00
fix allowable label id characters
This commit is contained in:
@@ -131,7 +131,7 @@ function smarty_function_html_radios_output($name, $value, $output, $selected, $
|
|||||||
$_output = '';
|
$_output = '';
|
||||||
if ($labels) {
|
if ($labels) {
|
||||||
if($label_ids) {
|
if($label_ids) {
|
||||||
$_id = smarty_function_escape_special_chars(str_replace(' ', '_', $name . '_' . $value));
|
$_id = smarty_function_escape_special_chars(preg_replace('![^\w\-\.]!', '_', $name . '_' . $value));
|
||||||
$_output .= '<label for="' . $_id . '">';
|
$_output .= '<label for="' . $_id . '">';
|
||||||
} else {
|
} else {
|
||||||
$_output .= '<label>';
|
$_output .= '<label>';
|
||||||
|
Reference in New Issue
Block a user