From 773f7d4b2d7747e21aabbd13501b10ad04693d34 Mon Sep 17 00:00:00 2001 From: Shivam7-1 <55046031+Shivam7-1@users.noreply.github.com> Date: Thu, 7 Nov 2024 18:59:37 +0530 Subject: [PATCH 1/2] Update debug.es6.js (#44342) Co-authored-by: David Jardin --- build/media_source/com_finder/js/debug.es6.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/media_source/com_finder/js/debug.es6.js b/build/media_source/com_finder/js/debug.es6.js index 274ba59c49d34..a68fc9e1e0fed 100644 --- a/build/media_source/com_finder/js/debug.es6.js +++ b/build/media_source/com_finder/js/debug.es6.js @@ -26,9 +26,9 @@ const output = document.getElementById('indexer-output'); try { const parsed = JSON.parse(response); - output.innerHTML = parsed.rendered; + output.innerHTML = Joomla.sanitizeHtml(parsed.rendered); } catch (e) { - output.innerHTML = response; + output.innerHTML = Joomla.sanitizeHtml(response); } }, onError: (xhr) => { From 7802043c130bcb1bf93c7b9321e4afa20ba76b4f Mon Sep 17 00:00:00 2001 From: Hannes Papenberg Date: Thu, 7 Nov 2024 15:21:53 +0100 Subject: [PATCH 2/2] Smart Search: Fix URL with highlight query (#43398) --- plugins/system/highlight/src/Extension/Highlight.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/system/highlight/src/Extension/Highlight.php b/plugins/system/highlight/src/Extension/Highlight.php index 0f8a013d02e70..52fcb230d6599 100644 --- a/plugins/system/highlight/src/Extension/Highlight.php +++ b/plugins/system/highlight/src/Extension/Highlight.php @@ -13,6 +13,7 @@ use Joomla\CMS\Component\ComponentHelper; use Joomla\CMS\Filter\InputFilter; use Joomla\CMS\Plugin\CMSPlugin; +use Joomla\CMS\Uri\Uri; use Joomla\Component\Finder\Administrator\Indexer\Result; // phpcs:disable PSR1.Files.SideEffects @@ -121,7 +122,9 @@ public function onFinderResult($item, $query) && empty($item->mime) && $params->get('highlight_terms', 1) ) { - $item->route .= '&highlight=' . base64_encode(json_encode(\array_slice($query->highlight, 0, 10))); + $uri = new Uri($item->route); + $uri->setVar('highlight', base64_encode(json_encode(\array_slice($query->highlight, 0, 10)))); + $item->route = $uri->toString(); } } }