From 13dd008803357dc86b9d16239698c929c3f89f2a Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Tue, 10 Jan 2017 00:15:50 +0100 Subject: [PATCH] Improved shown realname of email addresses. --- app/assets/javascripts/app/index.coffee | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/app/index.coffee b/app/assets/javascripts/app/index.coffee index 901647b93..c357871c1 100644 --- a/app/assets/javascripts/app/index.coffee +++ b/app/assets/javascripts/app/index.coffee @@ -212,7 +212,14 @@ class App extends Spine.Controller if result result = result + ', ' if item.name - result = result + App.Utils.htmlEscape(item.name) + ' ' + item.name = item.name + .replace(',', '') + .replace(';', '') + .replace('"', '') + .replace('\'', '') + if item.name.match(/\@|,|;|\^|\+|#|ยง|\$|%|&|\/|\(|\)|=|\?|\*/) + item.name = "\"#{item.name}\"" + result = "#{result}#{App.Utils.htmlEscape(item.name)} " if item.address result = result + " <#{App.Utils.htmlEscape(item.address)}>" result