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

Commit 5f3b03c

Browse files
committed
Fix a few no-useless-escape lint errors
Signed-off-by: Aaron Raimist <[email protected]>
1 parent 49ce4ef commit 5f3b03c

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/components/views/dialogs/CreateGroupDialog.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export default React.createClass({
5757
let error = null;
5858
if (!this.state.groupId) {
5959
error = _t("Community IDs cannot be empty.");
60-
} else if (!/^[a-z0-9=_\-\.\/]*$/.test(this.state.groupId)) {
60+
} else if (!/^[a-z0-9=_\-./]*$/.test(this.state.groupId)) {
6161
error = _t("Community IDs may only contain characters a-z, 0-9, or '=_-./'");
6262
}
6363
this.setState({

src/components/views/elements/Pill.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const REGEX_MATRIXTO = new RegExp(MATRIXTO_URL_PATTERN);
2929

3030
// For URLs of matrix.to links in the timeline which have been reformatted by
3131
// HttpUtils transformTags to relative links. This excludes event URLs (with `[^\/]*`)
32-
const REGEX_LOCAL_MATRIXTO = /^#\/(?:user|room|group)\/(([#!@+])[^\/]*)$/;
32+
const REGEX_LOCAL_MATRIXTO = /^#\/(?:user|room|group)\/(([#!@+])[^/]*)$/;
3333

3434
const Pill = React.createClass({
3535
statics: {

src/components/views/room_settings/RelatedGroupSettings.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import { _t } from '../../../languageHandler';
2222
import Modal from '../../../Modal';
2323
import isEqual from 'lodash/isEqual';
2424

25-
const GROUP_ID_REGEX = /\+\S+\:\S+/;
25+
const GROUP_ID_REGEX = /\+\S+:\S+/;
2626

2727
module.exports = React.createClass({
2828
displayName: 'RelatedGroupSettings',

src/phonenumber.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
const PHONE_NUMBER_REGEXP = /^[0-9 -\.]+$/;
17+
const PHONE_NUMBER_REGEXP = /^[0-9 -.]+$/;
1818

1919
/*
2020
* Do basic validation to determine if the given input could be

0 commit comments

Comments
 (0)