From effe83d7a961b2b0334d9aec1905559c8015c01b Mon Sep 17 00:00:00 2001 From: Noam Yorav-Raphael Date: Wed, 10 Jun 2015 11:47:07 +0300 Subject: [PATCH] Don't limit @mention autocomplete to latin characters The userSearch() function, used for @mention autocomplete, returned an empty list if the query string included non-latin characters or spaces. This removes this restriction, so you can search users by any characters in their display name, including spaces. --- app/assets/javascripts/discourse/lib/user-search.js.es6 | 5 ----- 1 file changed, 5 deletions(-) diff --git a/app/assets/javascripts/discourse/lib/user-search.js.es6 b/app/assets/javascripts/discourse/lib/user-search.js.es6 index 790a00ff0..068282c75 100644 --- a/app/assets/javascripts/discourse/lib/user-search.js.es6 +++ b/app/assets/javascripts/discourse/lib/user-search.js.es6 @@ -88,11 +88,6 @@ export default function userSearch(options) { currentTerm = term; return new Ember.RSVP.Promise(function(resolve) { - // TODO site setting for allowed regex in username - if (term.match(/[^a-zA-Z0-9_\.]/)) { - resolve([]); - return; - } if (((new Date() - cacheTime) > 30000) || (cacheTopicId !== topicId)) { cache = {}; }