luci-base: form.js: fix AbstractValue.textvalue() for uci list options
Serialize the uci list value into a space separated string before passing it to String.format() for HTML escaping. Without that change, empty strings were returned whenever the underlying uci get operation yieled an array. Fixes: #4993 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
6cda999e80
commit
5c792aefc7
1 changed files with 3 additions and 0 deletions
|
@ -1862,6 +1862,9 @@ var CBIAbstractValue = CBIAbstractElement.extend(/** @lends LuCI.form.AbstractVa
|
|||
if (cval == null)
|
||||
cval = this.default;
|
||||
|
||||
if (Array.isArray(cval))
|
||||
cval = cval.join(' ');
|
||||
|
||||
return (cval != null) ? '%h'.format(cval) : null;
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue