diff --git a/app/assets/javascripts/app/controllers/agent_ticket_create.coffee b/app/assets/javascripts/app/controllers/agent_ticket_create.coffee index 44c04a193..d4123771e 100644 --- a/app/assets/javascripts/app/controllers/agent_ticket_create.coffee +++ b/app/assets/javascripts/app/controllers/agent_ticket_create.coffee @@ -228,7 +228,7 @@ class App.TicketCreate extends App.Controller type = @$('[name="formSenderType"]').val() if signature isnt undefined && signature.body && type is 'email-out' - signatureFinished = App.Utils.replaceTags(signature.body, { user: App.Session.get() }) + signatureFinished = App.Utils.replaceTags(signature.body, { user: App.Session.get(), config: App.Config.all() }) body = @$('[data-name=body]') if App.Utils.signatureCheck(body.html() || '', signatureFinished) diff --git a/app/assets/javascripts/app/controllers/ticket_zoom/article_new.coffee b/app/assets/javascripts/app/controllers/ticket_zoom/article_new.coffee index befeae02d..edb39480d 100644 --- a/app/assets/javascripts/app/controllers/ticket_zoom/article_new.coffee +++ b/app/assets/javascripts/app/controllers/ticket_zoom/article_new.coffee @@ -525,7 +525,7 @@ class App.TicketZoomArticleNew extends App.Controller @$('[data-name=body] [data-signature="true"]').remove() # apply new signature - signatureFinished = App.Utils.replaceTags(signature.body, { user: App.Session.get(), ticket: ticketCurrent }) + signatureFinished = App.Utils.replaceTags(signature.body, { user: App.Session.get(), ticket: ticketCurrent, config: App.Config.all() }) body = @$('[data-name=body]') if App.Utils.signatureCheck(body.html() || '', signatureFinished) diff --git a/app/assets/javascripts/app/lib/app_post/utils.coffee b/app/assets/javascripts/app/lib/app_post/utils.coffee index 3730670ba..2c70db01e 100644 --- a/app/assets/javascripts/app/lib/app_post/utils.coffee +++ b/app/assets/javascripts/app/lib/app_post/utils.coffee @@ -126,6 +126,7 @@ class App.Utils # htmlEscapedAndPhoneified = App.Utils.phoneify(rawText) @phoneify: (string) -> + return string if _.isEmpty(string) string = string.replace(/[^0-9,\+,#,\*]+/g, '') .replace(/(.)\+/, '$1') "tel:#{string}"