From d7d28e75d5fcdf380cd4c4bb8dfd2902fc935619 Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Fri, 1 Apr 2011 13:17:48 +0000 Subject: [PATCH] strip html from caption in selectcols popup --- phpgwapi/js/egw_action/egw_grid.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/phpgwapi/js/egw_action/egw_grid.js b/phpgwapi/js/egw_action/egw_grid.js index 5e73cda1bd..11747a2b32 100644 --- a/phpgwapi/js/egw_action/egw_grid.js +++ b/phpgwapi/js/egw_action/egw_grid.js @@ -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