This commit fixes a problem with HTML entities which were visible in their
encoded form in the mobile view. This happened for example when displaying
a GridSection with a Value option containing " " in the title.
Without this change only HTML entities in titles that also contains tags
are decoded before they are stored in data-title attributes.
Signed-off-by: Mikael Magnusson <mikma@users.sourceforge.net>
},
/**
- * 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>');