mirror of
https://github.com/wekan/wekan.git
synced 2025-09-22 01:50:48 +02:00
Boards.copyTitle - escape string used in regex
This commit is contained in:
parent
550f7201bb
commit
a7bd8d42e8
1 changed files with 1 additions and 1 deletions
|
@ -569,7 +569,7 @@ Boards.helpers({
|
|||
*/
|
||||
copyTitle() {
|
||||
const m = this.title.match(/^(?<title>.*?)\s*(\[(?<num>\d+)]\s*$|\s*$)/);
|
||||
const title = m.groups.title;
|
||||
const title = escapeForRegex(m.groups.title);
|
||||
let num = 0;
|
||||
Boards.find({ title: new RegExp(`^${title}\\s*\\[\\d+]\\s*$`) }).forEach(
|
||||
board => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue