diff --git a/phpgwapi/inc/htmlpurifier/library/HTMLPurifier/PercentEncoder.php b/phpgwapi/inc/htmlpurifier/library/HTMLPurifier/PercentEncoder.php index 164b9bd83d..44ca77c369 100755 --- a/phpgwapi/inc/htmlpurifier/library/HTMLPurifier/PercentEncoder.php +++ b/phpgwapi/inc/htmlpurifier/library/HTMLPurifier/PercentEncoder.php @@ -51,8 +51,8 @@ class HTMLPurifier_PercentEncoder $ret = ''; //error_log(__METHOD__.__LINE__.$string); for ($i = 0, $c = strlen($string); $i < $c; $i++) { - if (substr($string,$i,1) !== '%' && !isset($this->preserve[$int = ord(substr($string,$i,1))]) ) { - $ret .= rawurlencode(substr($string,$i,1)); // '%' . sprintf('%02X', $int); + if (($chr=substr($string,$i,1)) !== '%' && !isset($this->preserve[$int = ord($chr)])) { + $ret .= rawurlencode($chr); // '%' . sprintf('%02X', $int); } else { $ret .= substr($string,$i,1); }