luci-base: cbi.js: properly handle non-strings in `%h` and `%q` formats
authorJo-Philipp Wich <jo@mein.io>
Thu, 9 Dec 2021 15:25:50 +0000 (16:25 +0100)
committerJo-Philipp Wich <jo@mein.io>
Thu, 9 Dec 2021 15:25:50 +0000 (16:25 +0100)
commit008bd893105d2bc8bfb5e5dce1ef00fa09008533
treebd1c06c7f95a89242791255305c761dd6d0a133a
parent43818163155d5ce49414a8e54f5746a85606ba03
luci-base: cbi.js: properly handle non-strings in `%h` and `%q` formats

Only replace null, objects and function values with the empty string but
return booleans and numbers as strings.

Spotted while debugging #5587.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/htdocs/luci-static/resources/cbi.js