Skip to content

Commit

Permalink
escape single quote in HTML option of a dropdown
Browse files Browse the repository at this point in the history
fix #3308
  • Loading branch information
btry authored and trasher committed Dec 19, 2017
1 parent baca5c9 commit 7cd0aa1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inc/dropdown.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1930,7 +1930,7 @@ static function showFromArray($name, array $elements, $options = []) {
$output .= "</optgroup>";
} else {
if (!isset($param['used'][$key])) {
$output .= "<option value='".$key."'";
$output .= "<option value='".Html::entities_deep($key)."'";
// Do not use in_array : trouble with 0 and empty value
foreach ($param['values'] as $value) {
if (strcmp($key, $value)===0) {
Expand Down

0 comments on commit 7cd0aa1

Please sign in to comment.