Skip to content

Commit

Permalink
WebUI: don't wrap regex literal in regex constructor
Browse files Browse the repository at this point in the history
PR #22206.
  • Loading branch information
Chocobo1 authored Jan 27, 2025
1 parent bb4a668 commit fe9dc13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/webui/www/private/scripts/rename-files.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ window.qBittorrent.MultiRename ??= (() => {
regexFlags += "i";

// Setup regex search
const regexEscapeExp = new RegExp(/[/\-\\^$*+?.()|[\]{}]/g);
const regexEscapeExp = /[/\-\\^$*+?.()|[\]{}]/g;
const standardSearch = new RegExp(this._inner_search.replace(regexEscapeExp, "\\$&"), regexFlags);
let regexSearch;
try {
Expand Down

0 comments on commit fe9dc13

Please sign in to comment.