Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
astridx committed Oct 28, 2017
1 parent 9de96ec commit a1133ae
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/com_search/views/search/view.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ public function display($tpl = null)

JLoader::register('ContentHelperRoute', JPATH_SITE . '/components/com_content/helpers/route.php');

// Make sure there are no slashes in the needle
$needle = str_replace('/', '\/', $needle);

for ($i = 0, $count = count($results); $i < $count; ++$i)
{
$row = &$results[$i]->text;
Expand Down Expand Up @@ -265,9 +268,6 @@ public function display($tpl = null)
$created = JHtml::_('date', $result->created, JText::_('DATE_FORMAT_LC3'));
}

// Make sure there are no slashes in the needle
$needle = str_replace('/', '\/', $needle);

$result->title = preg_replace("/\b($needle)\b/ui", $hl1 . "$1" . $hl2, htmlspecialchars($result->title, ENT_COMPAT, 'UTF-8'));
$result->text = JHtml::_('content.prepare', $result->text, '', 'com_search.search');
$result->created = $created;
Expand Down

0 comments on commit a1133ae

Please sign in to comment.