luci-base: form.js: trim option description
authorJo-Philipp Wich <jo@mein.io>
Mon, 16 May 2022 14:12:01 +0000 (16:12 +0200)
committerJo-Philipp Wich <jo@mein.io>
Mon, 16 May 2022 14:12:01 +0000 (16:12 +0200)
commitb6ae1d4f4aec94b38e59b11e5fd9c28799dae05b
treed6e494c3758c18419e7a2988afe9ab4143e37700
parent4e090e38d2cb606936768847ab0f5526f95be793
luci-base: form.js: trim option description

If a whitespace-only description is set on an element, the CSS :empty
selector will not match, causing description icons to be shown when
there's no actual content.

To avoid that, trim the description string when building the element.

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