|
|
@@ -269,15 +269,8 @@ class Zend_View_Helper_Navigation_Sitemap
|
|
|
$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:
|