strip html from caption in selectcols popup

This commit is contained in:
Klaus Leithoff 2011-04-01 13:17:48 +00:00
parent 151da7e0bd
commit d7d28e75d5

View File

@ -139,11 +139,14 @@ egwGrid.prototype.selectcolsClick = function(_at)
for (var k in column_data)
{
var col = column_data[k];
// strip html from caption
var strippedCaption = col.caption.replace(/&(lt|gt);/g, function (strMatch, p1) {
return (p1 == "lt")? "<" : ">";});
strippedCaption = strippedCaption.replace(/<\/?[^>]+(>|$)/g,"");
menu_data.push(
{
"id": k,
"caption": col.caption,
"caption": strippedCaption,
"enabled": col.enabled,
"checkbox": true,
"checked": col.visible