luci-base: ui.js: properly escape dynlist items for rendering
authorJo-Philipp Wich <jo@mein.io>
Wed, 4 Dec 2019 15:08:40 +0000 (16:08 +0100)
committerJo-Philipp Wich <jo@mein.io>
Wed, 4 Dec 2019 15:09:23 +0000 (16:09 +0100)
Ref: https://forum.openwrt.org/t/luci-theme-openwrt-reports-error/49736
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/htdocs/luci-static/resources/ui.js

index 1a9504b5d33cbb091bed65da77fe6ca99f3d78e1..faf05211db2eea5f02346dac5a4aabf932501adc 100644 (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,