Open tabs menu: Escape regex special characters
So we don't throw an error/match inappropriately when the filter contains backslashes, periods, pluses, and so on.
This commit is contained in:
parent
a1134255ee
commit
873c87956c
1 changed files with 1 additions and 1 deletions
|
@ -789,7 +789,7 @@ var Zotero_Tabs = new function () {
|
|||
let xhtmlNS = "http://www.w3.org/1999/xhtml";
|
||||
let desc = document.createXULElement('description');
|
||||
|
||||
let regex = new RegExp(`(${this._tabsMenuFilter})`, 'gi');
|
||||
let regex = new RegExp(`(${Zotero.Utilities.quotemeta(this._tabsMenuFilter)})`, 'gi');
|
||||
let matches = title.matchAll(regex);
|
||||
|
||||
let lastIndex = 0;
|
||||
|
|
Loading…
Reference in a new issue