luci-base: ui.js: properly escape dynlist items for rendering

Ref: https://forum.openwrt.org/t/luci-theme-openwrt-reports-error/49736
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit ee36066947)
This commit is contained in:
Jo-Philipp Wich 2019-12-04 16:08:40 +01:00
parent 039ef1f4de
commit 4193a20d5e

View file

@ -1300,7 +1300,7 @@ var UIDynamicList = UIElement.extend({
addItem: function(dl, value, text, flash) {
var exists = false,
new_item = E('div', { 'class': flash ? 'item flash' : 'item', 'tabindex': 0 }, [
E('span', {}, text || value),
E('span', {}, [ text || value ]),
E('input', {
'type': 'hidden',
'name': this.options.name,