Created
August 30, 2012 08:12
-
-
Save ajbonner/3524039 to your computer and use it in GitHub Desktop.
Unescaped input in breadcrumbs - Magento 1.6.x Mage_CatalogSearch_Block_Result
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Prepare layout | |
* | |
* @return Mage_CatalogSearch_Block_Result | |
*/ | |
protected function _prepareLayout() | |
{ | |
// add Home breadcrumb | |
$breadcrumbs = $this->getLayout()->getBlock('breadcrumbs'); | |
if ($breadcrumbs) { | |
$title = $this->__("Search results for: '%s'", $this->helper('catalogsearch')->getQueryText()); | |
$breadcrumbs->addCrumb('home', array( | |
'label' => $this->__('Home'), | |
'title' => $this->__('Go to Home Page'), | |
'link' => Mage::getBaseUrl() | |
))->addCrumb('search', array( | |
'label' => $title, | |
'title' => $title | |
)); | |
} | |
// modify page title | |
$title = $this->__("Search results for: '%s'", $this->helper('catalogsearch')->getEscapedQueryText()); | |
$this->getLayout()->getBlock('head')->setTitle($title); | |
return parent::_prepareLayout(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment