mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 00:13:35 +01:00
extending 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
9325d8d636
commit
123b46372b
@ -52,7 +52,7 @@ class HTMLPurifier_PercentEncoder
|
||||
//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 .= '%' . sprintf('%02X', $int);
|
||||
$ret .= rawurlencode(substr($string,$i,1)); // '%' . sprintf('%02X', $int);
|
||||
} else {
|
||||
$ret .= substr($string,$i,1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user