Skip to content

Commit

Permalink
Fix unescaped query on cross-site search results
Browse files Browse the repository at this point in the history
  • Loading branch information
zerocrates committed Mar 17, 2021
1 parent b2b4979 commit 05ac39a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
['class' => 'advanced-search']
); ?>

<h2><?php echo sprintf($this->translate('Item results for "%s"'), $fulltextSearch); ?></h2>
<h2><?php echo sprintf($this->translate('Item results for "%s"'), $this->escapeHtml($fulltextSearch)); ?></h2>

<?php echo $this->pagination(); ?>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
['class' => 'advanced-search']
); ?>

<h2><?php echo sprintf($this->translate('Item set results for "%s"'), $fulltextSearch); ?></h2>
<h2><?php echo sprintf($this->translate('Item set results for "%s"'), $this->escapeHtml($fulltextSearch)); ?></h2>

<?php echo $this->pagination(); ?>

Expand Down
2 changes: 1 addition & 1 deletion application/view/common/cross-site-search/results.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ $fulltextSearch = $this->params()->fromQuery('fulltext_search');
$hasResults = false;
?>

<h2><?php echo sprintf($this->translate('Search results for “%s”'), $fulltextSearch); ?></h2>
<h2><?php echo sprintf($this->translate('Search results for “%s”'), $this->escapeHtml($fulltextSearch)); ?></h2>

<?php
if ($responseSitePages && $responseSitePages->getTotalResults()):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php $fulltextSearch = $this->params()->fromQuery('fulltext_search'); ?>

<h2><?php echo sprintf($this->translate('Site page results for "%s"'), $fulltextSearch); ?></h2>
<h2><?php echo sprintf($this->translate('Site page results for "%s"'), $this->escapeHtml($fulltextSearch)); ?></h2>

<div class="site results">
<ul>
Expand All @@ -12,4 +12,4 @@
</li>
<?php endforeach; ?>
</ul>
</div>
</div>

0 comments on commit 05ac39a

Please sign in to comment.