diff options
author | Giovane <giovaneliberato@gmail.com> | 2015-10-23 15:36:37 -0200 |
---|---|---|
committer | Giovane <giovaneliberato@gmail.com> | 2015-10-23 15:36:37 -0200 |
commit | 07ed2f21d42e4f4c60b0897d98051b8385de2c04 (patch) | |
tree | 19a260c84be81e57be82eb0886d97caa8bc66fe4 | |
parent | 72e332e2969d4eb36c9cd64336c1f1d89b6185f1 (diff) |
Exclude comma and semicolon on invalid address split
-rw-r--r-- | web-ui/app/js/mail_view/ui/recipients/recipients_input.js | 2 | ||||
-rw-r--r-- | web-ui/test/spec/mail_view/ui/recipients/recipients_input.spec.js | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/web-ui/app/js/mail_view/ui/recipients/recipients_input.js b/web-ui/app/js/mail_view/ui/recipients/recipients_input.js index 54c8fed9..3e80b49e 100644 --- a/web-ui/app/js/mail_view/ui/recipients/recipients_input.js +++ b/web-ui/app/js/mail_view/ui/recipients/recipients_input.js @@ -136,7 +136,7 @@ define([ }; this.extractInvalidAddresses = function(rawAddresses) { - return rawAddresses.replace(emailAddressMatch, '').split(' '); + return rawAddresses.replace(emailAddressMatch, '').split(/[ ,;]/); }; this.init = function () { diff --git a/web-ui/test/spec/mail_view/ui/recipients/recipients_input.spec.js b/web-ui/test/spec/mail_view/ui/recipients/recipients_input.spec.js index 1656a83a..29194ee8 100644 --- a/web-ui/test/spec/mail_view/ui/recipients/recipients_input.spec.js +++ b/web-ui/test/spec/mail_view/ui/recipients/recipients_input.spec.js @@ -178,7 +178,7 @@ describeComponent('mail_view/ui/recipients/recipients_input',function () { }); it('displays it as an invalid address token when cannot parse', function() { - this.$node.val('invalid_format email@example.com'); + this.$node.val('invalid_format, email@example.com'); this.$node.trigger(blurEvent); expect(blurEvent.preventDefault).toHaveBeenCalled(); |