From 03fd308d009686f109c48588ca1ae2b7df163015 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Thu, 5 Jul 2018 14:29:49 +0200 Subject: [PATCH] Remove comma from personal part since comma is preserved as address separator --- addressbook/js/app.js | 3 +++ api/js/jsapi/egw_open.js | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/addressbook/js/app.js b/addressbook/js/app.js index d0029e91ae..590678f4ee 100644 --- a/addressbook/js/app.js +++ b/addressbook/js/app.js @@ -852,6 +852,9 @@ app.classes.addressbook = AppJS.extend( var personal = data.data.n_fn || ''; if (personal.match(/[^a-z0-9. -]/i)) personal = '"'+personal.replace(/"/, '\\"')+'"'; + //remove comma in personal as it will confilict with mail content comma seperator in the process + personal = personal.replace(/,/g,''); + if(email_business) { emails.push((personal?personal+' <':'')+email_business+(personal?'>':'')); diff --git a/api/js/jsapi/egw_open.js b/api/js/jsapi/egw_open.js index aa893f2175..9379a30871 100644 --- a/api/js/jsapi/egw_open.js +++ b/api/js/jsapi/egw_open.js @@ -49,7 +49,7 @@ egw.extend('open', egw.MODULE_WND_LOCAL, function(_egw, _wnd) match.push(index[0]); match[index[0]] = index[1]; } - + if (mailto[1]) mailto[1] = mailto[1].replace(/__AMPERSAND__/g, '&'); var content = { to: mailto[1] || [], cc: match['cc'] || [],