From b55fcedaca4bc8c72eb53daedd85ebf13f5a7362 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 27 Aug 2015 11:51:09 +0000 Subject: [PATCH] fixing r53501: group-favorite has escaped name visible after reload --- phpgwapi/inc/class.egw_favorites.inc.php | 1 + phpgwapi/js/jsapi/app_base.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/phpgwapi/inc/class.egw_favorites.inc.php b/phpgwapi/inc/class.egw_favorites.inc.php index aed3915388..2ee5556359 100644 --- a/phpgwapi/inc/class.egw_favorites.inc.php +++ b/phpgwapi/inc/class.egw_favorites.inc.php @@ -231,6 +231,7 @@ class egw_favorites 'group' => $group ? $group : false, 'state' => $filters ); + $pref_name = "favorite_".preg_replace('/[^A-Za-z0-9-_]/','_',$name); $result = $prefs->add($app,$pref_name,$filters,$type); $pref = $prefs->save_repository(false,$type); diff --git a/phpgwapi/js/jsapi/app_base.js b/phpgwapi/js/jsapi/app_base.js index 78cc8ababd..8c911ed153 100644 --- a/phpgwapi/js/jsapi/app_base.js +++ b/phpgwapi/js/jsapi/app_base.js @@ -614,7 +614,7 @@ var AppJS = Class.extend( self.egw.jsonq(self.appname+'.egw_framework.ajax_set_favorite.template', [ self.appname, - safe_name, + name.val(), "add", self.favorite_popup.group.get_value(), self.favorite_popup.state