mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-27 08:19:45 +01:00
* core: reintroduce rev32909 (myStylite ticket#987: fixing a problem regarding chopped off urls when URI in question contains umlauts AND mbstring.func_overload is activated)
This commit is contained in:
parent
375006403c
commit
66ca12e6f2
@ -49,13 +49,15 @@ class HTMLPurifier_PercentEncoder
|
|||||||
*/
|
*/
|
||||||
public function encode($string) {
|
public function encode($string) {
|
||||||
$ret = '';
|
$ret = '';
|
||||||
|
//error_log(__METHOD__.__LINE__.$string);
|
||||||
for ($i = 0, $c = strlen($string); $i < $c; $i++) {
|
for ($i = 0, $c = strlen($string); $i < $c; $i++) {
|
||||||
if ($string[$i] !== '%' && !isset($this->preserve[$int = ord($string[$i])]) ) {
|
if (substr($string,$i,1) !== '%' && !isset($this->preserve[$int = ord(substr($string,$i,1))]) ) {
|
||||||
$ret .= '%' . sprintf('%02X', $int);
|
$ret .= '%' . sprintf('%02X', $int);
|
||||||
} else {
|
} else {
|
||||||
$ret .= $string[$i];
|
$ret .= substr($string,$i,1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//error_log(__METHOD__.__LINE__.$ret);
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user