diff options
author | Mitchell Hentges <mitchhentges@protonmail.com> | 2016-09-22 11:15:00 -0700 |
---|---|---|
committer | Mitchell Hentges <mitchhentges@protonmail.com> | 2016-10-10 18:26:22 -0700 |
commit | f19766a3c2223b05e1f6de1746a44e7173387988 (patch) | |
tree | 68e962dbd5a03119e2b9ae684cf4eedd1f16edee | |
parent | 6f441ae1a10a00007fcb361626f826321b511d90 (diff) | |
download | gitlab-ce-f19766a3c2223b05e1f6de1746a44e7173387988.tar.gz |
Ensure that whitespace doesn't case adding members to fail
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | app/assets/javascripts/users_select.js | 5 |
2 files changed, 4 insertions, 2 deletions
diff --git a/CHANGELOG b/CHANGELOG index dc06303aecf..d94305a66d1 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,7 @@ Please view this file on the master branch, on stable branches it's out of date. v 8.13.0 (unreleased) - Truncate long labels with ellipsis in labels page + - Adding members no longer silently fails when there is extra whitespace - Update runner version only when updating contacted_at - Add link from system note to compare with previous version - Improve issue load time performance by avoiding ORDER BY in find_by call diff --git a/app/assets/javascripts/users_select.js b/app/assets/javascripts/users_select.js index bcabda3ceb2..d966277a8b2 100644 --- a/app/assets/javascripts/users_select.js +++ b/app/assets/javascripts/users_select.js @@ -261,10 +261,11 @@ } } if (showEmailUser && data.results.length === 0 && query.term.match(/^[^@]+@[^@]+$/)) { + var trimmed = query.term.trim(); emailUser = { name: "Invite \"" + query.term + "\"", - username: query.term, - id: query.term + username: trimmed, + id: trimmed }; data.results.unshift(emailUser); } |