mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-16 02:49:03 +01:00
extending (trunk) patch rev32909/34417 (chopped off urls when URI contains umlauts AND mbstring.func_overload is activated): using rawurlencode instead of '%' . sprintf('%02X', ); as ord() only returns the int for the first character in a given string, thus crippling multibyte chars
This commit is contained in:
parent
46c1b46bce
commit
ac35d07a1f
@ -52,7 +52,7 @@ class HTMLPurifier_PercentEncoder
|
|||||||
//error_log(__METHOD__.__LINE__.$string);
|
//error_log(__METHOD__.__LINE__.$string);
|
||||||
for ($i = 0, $c = strlen($string); $i < $c; $i++) {
|
for ($i = 0, $c = strlen($string); $i < $c; $i++) {
|
||||||
if (substr($string,$i,1) !== '%' && !isset($this->preserve[$int = ord(substr($string,$i,1))]) ) {
|
if (substr($string,$i,1) !== '%' && !isset($this->preserve[$int = ord(substr($string,$i,1))]) ) {
|
||||||
$ret .= '%' . sprintf('%02X', $int);
|
$ret .= rawurlencode(substr($string,$i,1)); // '%' . sprintf('%02X', $int);
|
||||||
} else {
|
} else {
|
||||||
$ret .= substr($string,$i,1);
|
$ret .= substr($string,$i,1);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user