PHP's don't-double-encode implementation leaves invalid entities
authorChuck Hagenbuch <chuck@horde.org>
Sat, 30 May 2009 15:34:02 +0000 (11:34 -0400)
committerChuck Hagenbuch <chuck@horde.org>
Sat, 30 May 2009 15:34:02 +0000 (11:34 -0400)
framework/View/lib/Horde/View/Helper/Tag.php

index 663e9eb..7365286 100644 (file)
@@ -112,11 +112,7 @@ class Horde_View_Helper_Tag extends Horde_View_Helper_Base
      */
     public function escapeOnce($html)
     {
-        if (version_compare(PHP_VERSION, '5.2.3', '>=')) {
-            return htmlspecialchars($html, ENT_QUOTES, $this->_view->getEncoding(), false);
-        } else {
-            return $this->_fixDoubleEscape($this->_view->escape($html));
-        }
+        return $this->_fixDoubleEscape($this->escape($html));
     }
 
     /**