luci-base: ui.js: ensure that select choice labels are properly escaped
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
ee36066947
commit
71d370a964
1 changed files with 2 additions and 2 deletions
|
@ -312,7 +312,7 @@ var UISelect = UIElement.extend({
|
||||||
frameEl.lastChild.appendChild(E('option', {
|
frameEl.lastChild.appendChild(E('option', {
|
||||||
'value': '',
|
'value': '',
|
||||||
'selected': (this.values.length == 0 || this.values[0] == '') ? '' : null
|
'selected': (this.values.length == 0 || this.values[0] == '') ? '' : null
|
||||||
}, this.choices[''] || this.options.placeholder || _('-- Please choose --')));
|
}, [ this.choices[''] || this.options.placeholder || _('-- Please choose --') ]));
|
||||||
|
|
||||||
for (var i = 0; i < keys.length; i++) {
|
for (var i = 0; i < keys.length; i++) {
|
||||||
if (keys[i] == null || keys[i] == '')
|
if (keys[i] == null || keys[i] == '')
|
||||||
|
@ -321,7 +321,7 @@ var UISelect = UIElement.extend({
|
||||||
frameEl.lastChild.appendChild(E('option', {
|
frameEl.lastChild.appendChild(E('option', {
|
||||||
'value': keys[i],
|
'value': keys[i],
|
||||||
'selected': (this.values.indexOf(keys[i]) > -1) ? '' : null
|
'selected': (this.values.indexOf(keys[i]) > -1) ? '' : null
|
||||||
}, this.choices[keys[i]] || keys[i]));
|
}, [ this.choices[keys[i]] || keys[i] ]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in a new issue