From: Jo-Philipp Wich Date: Thu, 12 Sep 2019 08:49:04 +0000 (+0200) Subject: luci-base: form.js: handle non-string values in stripTags() X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=9be42e29e702c4b2c7d89e469a381204936ddf44;p=oweals%2Fluci.git luci-base: form.js: handle non-string values in stripTags() Signed-off-by: Jo-Philipp Wich --- diff --git a/modules/luci-base/htdocs/luci-static/resources/form.js b/modules/luci-base/htdocs/luci-static/resources/form.js index 6692d52ab..f0629d0ca 100644 --- a/modules/luci-base/htdocs/luci-static/resources/form.js +++ b/modules/luci-base/htdocs/luci-static/resources/form.js @@ -52,7 +52,7 @@ var CBINode = Class.extend({ }, stripTags: function(s) { - if (!s.match(/[<>]/)) + if (typeof(s) == 'string' && !s.match(/[<>]/)) return s; var x = E('div', {}, s);