WebUI: don't wrap regex literal in regex constructor

PR #22206.
This commit is contained in:
Chocobo1 2025-01-28 00:33:04 +08:00 committed by GitHub
commit fe9dc131bc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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 {