Skip to content

Commit

Permalink
fix(fileregex): escaping special characters in regex
Browse files Browse the repository at this point in the history
see #206
  • Loading branch information
Mara-Li committed Aug 24, 2023
1 parent 23de02f commit 64b2c01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/settings/modals/regex_edition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export class ModalRegexFilePathName extends Modal {
value = "";
isForbidden = true;
} else if (type === TypeOfEditRegex.path) {
if (value.match(/[\\><:"|?*]/)){
if (value.match(/[\\><:"|?*]/) && !value.match(/^\/(.*)\/[gmisuvdy]*$/)){
new Notice(i18next.t("settings.regexReplacing.forbiddenValue", { what: onWhat, forbiddenChar: value.match(/[\\><:"|?*]/)![0]}));
value = "";
isForbidden = true;
Expand Down

0 comments on commit 64b2c01

Please sign in to comment.