Remove two noop backslashes in regexes

This commit is contained in:
riking 2014-03-18 18:24:36 -07:00
parent 86774fa5c1
commit 834a721bbe
2 changed files with 2 additions and 2 deletions

View file

@ -8,7 +8,7 @@ Discourse.AutoCloseFormComponent = Ember.Component.extend({
autoCloseChanged: function() {
if( this.get('autoCloseTime') && this.get('autoCloseTime').length > 0 ) {
this.set('autoCloseTime', this.get('autoCloseTime').replace(/[^\d-\s\:]/g, '') );
this.set('autoCloseTime', this.get('autoCloseTime').replace(/[^:\d-\s]/g, '') );
}
this.set('autoCloseValid', this.isAutoCloseValid());
}.observes('autoCloseTime'),

View file

@ -35,7 +35,7 @@ Discourse.UserSearch = {
var promise = Ember.Deferred.create();
// TODO site setting for allowed regex in username
if (term.match(/[^a-zA-Z0-9\_\.]/)) {
if (term.match(/[^a-zA-Z0-9_\.]/)) {
promise.resolve([]);
return promise;
}