From 833a9a1c4ce34fa10a72db4444465fcb20294ce2 Mon Sep 17 00:00:00 2001 From: ralf Date: Mon, 15 Jul 2024 15:22:33 +0200 Subject: [PATCH] fix JS error leaving mail-tree in main window caused by not properly escaped single quotes when constructing a querySelector --- api/js/etemplate/Et2Tree/Et2Tree.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/js/etemplate/Et2Tree/Et2Tree.ts b/api/js/etemplate/Et2Tree/Et2Tree.ts index ed624e22b5..900a3bb54a 100644 --- a/api/js/etemplate/Et2Tree/Et2Tree.ts +++ b/api/js/etemplate/Et2Tree/Et2Tree.ts @@ -468,7 +468,7 @@ export class Et2Tree extends Et2WidgetWithSelectMixin(LitElement) getDomNode(_id): SlTreeItem|null { - return this.shadowRoot.querySelector("sl-tree-item[id='" + _id + "'"); + return this.shadowRoot.querySelector('sl-tree-item[id="' + _id.replace(/"/g, '\\"') + '"'); }