luci-base: form.js: handle non-string values in stripTags()

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
Jo-Philipp Wich 2019-09-12 10:49:04 +02:00
parent 441bd24d07
commit 9be42e29e7

View 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);