Skip to content

Commit

Permalink
Merge branch '5.2-dev' of github.com:joomla/joomla-cms into 5.2-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Hackwar committed Nov 7, 2024
2 parents f8688d6 + 7802043 commit 30a64b3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions build/media_source/com_finder/js/debug.es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
5 changes: 4 additions & 1 deletion plugins/system/highlight/src/Extension/Highlight.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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();
}
}
}

0 comments on commit 30a64b3

Please sign in to comment.