luci-base: form.js: handle non-string values in stripTags()
authorJo-Philipp Wich <jo@mein.io>
Thu, 12 Sep 2019 08:49:04 +0000 (10:49 +0200)
committerJo-Philipp Wich <jo@mein.io>
Thu, 12 Sep 2019 09:09:57 +0000 (11:09 +0200)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/htdocs/luci-static/resources/form.js

index 6692d52abf7c962be10242d747b3099ef68fa4fa..f0629d0ca798a6014abb27ec429942b2c304a696 100644 (file)
@@ -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);