diff -r 5e7a0fedabdf -r 877f952ae2bd web/lib/Zend/View/Helper/Navigation/Sitemap.php --- a/web/lib/Zend/View/Helper/Navigation/Sitemap.php Thu Mar 21 17:31:31 2013 +0100 +++ b/web/lib/Zend/View/Helper/Navigation/Sitemap.php Thu Mar 21 19:50:53 2013 +0100 @@ -15,9 +15,9 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: Sitemap.php 20104 2010-01-06 21:26:01Z matthew $ + * @version $Id: Sitemap.php 25239 2013-01-22 09:45:01Z frosch $ */ /** @@ -33,7 +33,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_View_Helper_Navigation_Sitemap @@ -54,13 +54,6 @@ const SITEMAP_XSD = 'http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd'; /** - * Whether XML output should be formatted - * - * @var bool - */ - protected $_formatOutput = false; - - /** * Whether the XML declaration should be included in XML output * * @var bool @@ -109,31 +102,6 @@ // Accessors: /** - * Sets whether XML output should be formatted - * - * @param bool $formatOutput [optional] whether output - * should be formatted. Default - * is true. - * @return Zend_View_Helper_Navigation_Sitemap fluent interface, returns - * self - */ - public function setFormatOutput($formatOutput = true) - { - $this->_formatOutput = (bool) $formatOutput; - return $this; - } - - /** - * Returns whether XML output should be formatted - * - * @return bool whether XML output should be formatted - */ - public function getFormatOutput() - { - return $this->_formatOutput; - } - - /** * Sets whether the XML declaration should be used in output * * @param bool $useXmlDecl whether XML delcaration @@ -269,15 +237,8 @@ $enc = $this->view->getEncoding(); } - // TODO: remove check when minimum PHP version is >= 5.2.3 - if (version_compare(PHP_VERSION, '5.2.3', '>=')) { - // do not encode existing HTML entities - return htmlspecialchars($string, ENT_QUOTES, $enc, false); - } else { - $string = preg_replace('/&(?!(?:#\d++|[a-z]++);)/ui', '&', $string); - $string = str_replace(array('<', '>', '\'', '"'), array('<', '>', ''', '"'), $string); - return $string; - } + // do not encode existing HTML entities + return htmlspecialchars($string, ENT_QUOTES, $enc, false); } // Public methods: @@ -478,6 +439,6 @@ $dom->saveXML() : $dom->saveXML($dom->documentElement); - return rtrim($xml, PHP_EOL); + return rtrim($xml, self::EOL); } }