Index: /Zend Framework/library/Zend/Navigation/Page/Mvc.php =================================================================== --- /Zend Framework/library/Zend/Navigation/Page/Mvc.php (revision 24121) +++ /Zend Framework/library/Zend/Navigation/Page/Mvc.php (working copy) @@ -93,6 +93,14 @@ * @var bool */ protected $_resetParams = true; + + /** + * Whether href should be encoded when assembling URL + * + * @see getHref() + * @var bool + */ + protected $_encodeUrl = true; /** * Cached href @@ -208,7 +216,8 @@ $url = self::$_urlHelper->url($params, $this->getRoute(), - $this->getResetParams()); + $this->getResetParams(), + $this->getEncodeUrl()); return $this->_hrefCache = $url; } @@ -410,6 +419,35 @@ { return $this->_resetParams; } + + /** + * Sets whether href should be encoded when assembling URL + * + * @see getHref() + * + * @param bool $resetParams whether href should be encoded when + * assembling URL + * @return Zend_Navigation_Page_Mvc fluent interface, returns self + */ + public function setEncodeUrl($encodeUrl) + { + $this->_encodeUrl = (bool) $encodeUrl; + $this->_hrefCache = null; + + return $this; + } + + /** + * Returns whether herf should be encoded when assembling URL + * + * @see getHref() + * + * @return bool whether herf should be encoded when assembling URL + */ + public function getEncodeUrl() + { + return $this->_encodeUrl; + } /** * Sets action helper for assembling URLs @@ -441,7 +479,8 @@ 'module' => $this->getModule(), 'params' => $this->getParams(), 'route' => $this->getRoute(), - 'reset_params' => $this->getResetParams() + 'reset_params' => $this->getResetParams(), + 'encodeUrl' => $this->getEncodeUrl(), )); } }