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