diff options
author | Andy Wermke <andy@dev.next-step-software.com> | 2013-04-08 14:33:51 +0200 |
---|---|---|
committer | Andy Wermke <andy@dev.next-step-software.com> | 2013-04-08 14:33:51 +0200 |
commit | bf3084b608b8a1036f0b091140350813d54c3d0d (patch) | |
tree | 117dfd4d6db9f03eec4d227d6b1911c3d4882284 /program/lib/Roundcube/html.php | |
parent | fe245e5f5dbea1c18517471103185e04a52c89b3 (diff) | |
parent | 4fdaa02ac724e597479a4a48388a8a10101000fd (diff) |
Merge branch 'master' of https://github.com/roundcube/roundcubemail
Diffstat (limited to 'program/lib/Roundcube/html.php')
-rw-r--r-- | program/lib/Roundcube/html.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/program/lib/Roundcube/html.php b/program/lib/Roundcube/html.php index 592720308..7b30e60cb 100644 --- a/program/lib/Roundcube/html.php +++ b/program/lib/Roundcube/html.php @@ -35,6 +35,7 @@ class html public static $common_attrib = array('id','class','style','title','align'); public static $containers = array('iframe','div','span','p','h1','h2','h3','form','textarea','table','thead','tbody','tr','th','td','style','script'); + /** * Constructor * @@ -332,7 +333,16 @@ class html */ public static function quote($str) { - return @htmlspecialchars($str, ENT_COMPAT, RCUBE_CHARSET); + static $flags; + + if (!$flags) { + $flags = ENT_COMPAT; + if (defined('ENT_SUBSTITUTE')) { + $flags |= ENT_SUBSTITUTE; + } + } + + return @htmlspecialchars($str, $flags, RCUBE_CHARSET); } } |