projects
/
horde.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d36a0c5
)
php 5.2.3 and above has a built-in way to do escapeOnce
author
Chuck Hagenbuch
<chuck@horde.org>
Thu, 28 May 2009 03:26:45 +0000
(23:26 -0400)
committer
Chuck Hagenbuch
<chuck@horde.org>
Thu, 28 May 2009 03:26:45 +0000
(23:26 -0400)
framework/View/lib/Horde/View/Helper/Tag.php
patch
|
blob
|
history
diff --git
a/framework/View/lib/Horde/View/Helper/Tag.php
b/framework/View/lib/Horde/View/Helper/Tag.php
index
837bdc4
..
663e9eb
100644
(file)
--- a/
framework/View/lib/Horde/View/Helper/Tag.php
+++ b/
framework/View/lib/Horde/View/Helper/Tag.php
@@
-112,7
+112,11
@@
class Horde_View_Helper_Tag extends Horde_View_Helper_Base
*/
public function escapeOnce($html)
{
- return $this->_fixDoubleEscape($this->_view->escape($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));
+ }
}
/**