From 5f3b03c85aa512be8575c32b14c0d7d004ba6076 Mon Sep 17 00:00:00 2001 From: Aaron Raimist Date: Fri, 26 Oct 2018 23:00:51 -0500 Subject: [PATCH] Fix a few no-useless-escape lint errors Signed-off-by: Aaron Raimist --- src/components/views/dialogs/CreateGroupDialog.js | 2 +- src/components/views/elements/Pill.js | 2 +- src/components/views/room_settings/RelatedGroupSettings.js | 2 +- src/phonenumber.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/views/dialogs/CreateGroupDialog.js b/src/components/views/dialogs/CreateGroupDialog.js index 6e14d1cf66..882d323449 100644 --- a/src/components/views/dialogs/CreateGroupDialog.js +++ b/src/components/views/dialogs/CreateGroupDialog.js @@ -57,7 +57,7 @@ export default React.createClass({ let error = null; if (!this.state.groupId) { error = _t("Community IDs cannot be empty."); - } else if (!/^[a-z0-9=_\-\.\/]*$/.test(this.state.groupId)) { + } else if (!/^[a-z0-9=_\-./]*$/.test(this.state.groupId)) { error = _t("Community IDs may only contain characters a-z, 0-9, or '=_-./'"); } this.setState({ diff --git a/src/components/views/elements/Pill.js b/src/components/views/elements/Pill.js index af7e8c4ae3..0d0949f07c 100644 --- a/src/components/views/elements/Pill.js +++ b/src/components/views/elements/Pill.js @@ -29,7 +29,7 @@ const REGEX_MATRIXTO = new RegExp(MATRIXTO_URL_PATTERN); // For URLs of matrix.to links in the timeline which have been reformatted by // HttpUtils transformTags to relative links. This excludes event URLs (with `[^\/]*`) -const REGEX_LOCAL_MATRIXTO = /^#\/(?:user|room|group)\/(([#!@+])[^\/]*)$/; +const REGEX_LOCAL_MATRIXTO = /^#\/(?:user|room|group)\/(([#!@+])[^/]*)$/; const Pill = React.createClass({ statics: { diff --git a/src/components/views/room_settings/RelatedGroupSettings.js b/src/components/views/room_settings/RelatedGroupSettings.js index 65132b9b74..4bad5ca806 100644 --- a/src/components/views/room_settings/RelatedGroupSettings.js +++ b/src/components/views/room_settings/RelatedGroupSettings.js @@ -22,7 +22,7 @@ import { _t } from '../../../languageHandler'; import Modal from '../../../Modal'; import isEqual from 'lodash/isEqual'; -const GROUP_ID_REGEX = /\+\S+\:\S+/; +const GROUP_ID_REGEX = /\+\S+:\S+/; module.exports = React.createClass({ displayName: 'RelatedGroupSettings', diff --git a/src/phonenumber.js b/src/phonenumber.js index aaf018ba26..3b7e4ba4f1 100644 --- a/src/phonenumber.js +++ b/src/phonenumber.js @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -const PHONE_NUMBER_REGEXP = /^[0-9 -\.]+$/; +const PHONE_NUMBER_REGEXP = /^[0-9 -.]+$/; /* * Do basic validation to determine if the given input could be