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) => { 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(); } } }