mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-25 08:09:02 +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
e532c973d3
commit
0255244b30
@ -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