From 7b6eb243ed12759cf61d4eee8ed2e044be951acb Mon Sep 17 00:00:00 2001 From: Zev Benjamin Date: Fri, 2 Nov 2012 19:54:43 -0400 Subject: [PATCH] Make the regex that removes trailing commas in the huddle recipient box on blur more robust (imported from commit ff71c802c5590a96c6649aa9a5e7c841bed82e1f) --- zephyr/static/js/composebox_typeahead.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zephyr/static/js/composebox_typeahead.js b/zephyr/static/js/composebox_typeahead.js index 4b34ad1b6b..19ccc43ae8 100644 --- a/zephyr/static/js/composebox_typeahead.js +++ b/zephyr/static/js/composebox_typeahead.js @@ -132,7 +132,7 @@ exports.initialize = function () { $( "#huddle_recipient" ).blur(function (event) { var val = $(this).val(); - $(this).val(val.replace(/[,;] *$/, '')); + $(this).val(val.replace(/\s*[,;]\s*$/, '')); }); composebox_typeahead.update_autocomplete();