Remove two noop backslashes in regexes
This commit is contained in:
parent
86774fa5c1
commit
834a721bbe
|
@ -8,7 +8,7 @@ Discourse.AutoCloseFormComponent = Ember.Component.extend({
|
||||||
|
|
||||||
autoCloseChanged: function() {
|
autoCloseChanged: function() {
|
||||||
if( this.get('autoCloseTime') && this.get('autoCloseTime').length > 0 ) {
|
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());
|
this.set('autoCloseValid', this.isAutoCloseValid());
|
||||||
}.observes('autoCloseTime'),
|
}.observes('autoCloseTime'),
|
||||||
|
|
|
@ -35,7 +35,7 @@ Discourse.UserSearch = {
|
||||||
var promise = Ember.Deferred.create();
|
var promise = Ember.Deferred.create();
|
||||||
|
|
||||||
// TODO site setting for allowed regex in username
|
// TODO site setting for allowed regex in username
|
||||||
if (term.match(/[^a-zA-Z0-9\_\.]/)) {
|
if (term.match(/[^a-zA-Z0-9_\.]/)) {
|
||||||
promise.resolve([]);
|
promise.resolve([]);
|
||||||
return promise;
|
return promise;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue