From fd077ef8c9ed7b637593ed7d5c8edf4206492630 Mon Sep 17 00:00:00 2001 From: Denny Bresch Date: Wed, 6 Sep 2017 16:17:58 +0200 Subject: [PATCH] #1193 - quote name for special character. --- .../lib/app_post/_object_organization_autocompletion.coffee | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/assets/javascripts/app/lib/app_post/_object_organization_autocompletion.coffee b/app/assets/javascripts/app/lib/app_post/_object_organization_autocompletion.coffee index 04f4482b5..011dc2202 100644 --- a/app/assets/javascripts/app/lib/app_post/_object_organization_autocompletion.coffee +++ b/app/assets/javascripts/app/lib/app_post/_object_organization_autocompletion.coffee @@ -113,6 +113,10 @@ class App.ObjectOrganizationAutocompletion extends App.Controller @createToken name, objectId else if object.email + + # quote name for special character + if name.match(/\@|,|;|\^|\+|#|ยง|\$|%|&|\/|\(|\)|=|\?|!|\*|\[|\]/) + name = "\"#{name}\"" name += " <#{object.email}>" @objectSelect.val(name)