From af2f7870023deffef4f480f3a7d90d57ccf65d20 Mon Sep 17 00:00:00 2001 From: Lukasz Ostafin Date: Fri, 13 Oct 2023 11:48:34 +0200 Subject: [PATCH] IBX-6517: Search form for activiety log --- src/bundle/Resources/public/js/scripts/core/dropdown.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/bundle/Resources/public/js/scripts/core/dropdown.js b/src/bundle/Resources/public/js/scripts/core/dropdown.js index 1818361439..9d298024ad 100644 --- a/src/bundle/Resources/public/js/scripts/core/dropdown.js +++ b/src/bundle/Resources/public/js/scripts/core/dropdown.js @@ -163,14 +163,16 @@ } if (value) { - this.sourceInput.querySelector(`[value="${value}"]`).selected = selected; + this.sourceInput.querySelector(`[value="${CSS.escape(value)}"]`).selected = selected; if (!this.canSelectOnlyOne) { element.querySelector('.ibexa-input').checked = selected; } } - this.itemsListContainer.querySelector(`[data-value="${value}"]`).classList.toggle('ibexa-dropdown__item--selected', selected); + this.itemsListContainer + .querySelector(`[data-value="${CSS.escape(value)}"]`) + .classList.toggle('ibexa-dropdown__item--selected', selected); const selectedItemsList = this.container.querySelector('.ibexa-dropdown__selection-info');