From 834a721bbe18e2e062b9cb01e1cc814c010b2f24 Mon Sep 17 00:00:00 2001 From: riking Date: Tue, 18 Mar 2014 18:24:36 -0700 Subject: [PATCH] Remove two noop backslashes in regexes --- .../discourse/components/auto_close_form_component.js | 2 +- app/assets/javascripts/discourse/lib/user_search.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/discourse/components/auto_close_form_component.js b/app/assets/javascripts/discourse/components/auto_close_form_component.js index 2d8e1bbe709..b760c710930 100644 --- a/app/assets/javascripts/discourse/components/auto_close_form_component.js +++ b/app/assets/javascripts/discourse/components/auto_close_form_component.js @@ -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'), diff --git a/app/assets/javascripts/discourse/lib/user_search.js b/app/assets/javascripts/discourse/lib/user_search.js index c9756046cbb..9bf1989c9da 100644 --- a/app/assets/javascripts/discourse/lib/user_search.js +++ b/app/assets/javascripts/discourse/lib/user_search.js @@ -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; }