Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Fix a few no-useless-escape lint errors
Browse files Browse the repository at this point in the history
Signed-off-by: Aaron Raimist <aaron@raim.ist>
  • Loading branch information
aaronraimist committed Oct 27, 2018
1 parent 49ce4ef commit 5f3b03c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/components/views/dialogs/CreateGroupDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
2 changes: 1 addition & 1 deletion src/components/views/elements/Pill.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/views/room_settings/RelatedGroupSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion src/phonenumber.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5f3b03c

Please sign in to comment.