mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 10:24:26 +02:00
Fix html_options output to be XHTML compatible.
This commit is contained in:
@@ -39,7 +39,7 @@ function smarty_function_html_options($params, &$smarty)
|
|||||||
$sel_check = $output[$i]; /* if more outputs than values, then
|
$sel_check = $output[$i]; /* if more outputs than values, then
|
||||||
check output against $selected */
|
check output against $selected */
|
||||||
if (in_array($sel_check, $selected))
|
if (in_array($sel_check, $selected))
|
||||||
$html_result .= " selected";
|
$html_result .= " selected=\"selected\"";
|
||||||
$html_result .= ">".$output[$i]."</option>\n";
|
$html_result .= ">".$output[$i]."</option>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -39,7 +39,7 @@ function smarty_function_html_options($params, &$smarty)
|
|||||||
$sel_check = $output[$i]; /* if more outputs than values, then
|
$sel_check = $output[$i]; /* if more outputs than values, then
|
||||||
check output against $selected */
|
check output against $selected */
|
||||||
if (in_array($sel_check, $selected))
|
if (in_array($sel_check, $selected))
|
||||||
$html_result .= " selected";
|
$html_result .= " selected=\"selected\"";
|
||||||
$html_result .= ">".$output[$i]."</option>\n";
|
$html_result .= ">".$output[$i]."</option>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user