summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/htdocs
diff options
context:
space:
mode:
Diffstat (limited to 'modules/luci-base/htdocs')
-rw-r--r--modules/luci-base/htdocs/luci-static/resources/form.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/form.js b/modules/luci-base/htdocs/luci-static/resources/form.js
index 3834bceb01..624bc2c2f8 100644
--- a/modules/luci-base/htdocs/luci-static/resources/form.js
+++ b/modules/luci-base/htdocs/luci-static/resources/form.js
@@ -275,16 +275,18 @@ var CBIAbstractElement = baseclass.extend(/** @lends LuCI.form.AbstractElement.p
},
/**
- * Strip any HTML tags from the given input string.
+ * Strip any HTML tags from the given input string, and decode
+ * HTML entities.
*
* @param {string} s
* The input string to clean.
*
* @returns {string}
- * The cleaned input string with HTML tags removed.
+ * The cleaned input string with HTML tags removed, and HTML
+ * entities decoded.
*/
stripTags: function(s) {
- if (typeof(s) == 'string' && !s.match(/[<>]/))
+ if (typeof(s) == 'string' && !s.match(/[<>\&]/))
return s;
var x = dom.elem(s) ? s : dom.parse('<div>' + s + '</div>');