| @@ 180-183 (lines=4) @@ | ||
| 177 | */ |
|
| 178 | public static function filterString($s, $normalization_form = 4 /* n::NFC */, $leading_combining = '◌') |
|
| 179 | { |
|
| 180 | if (false !== strpos($s, "\r")) { |
|
| 181 | // Workaround https://bugs.php.net/65732 |
|
| 182 | $s = str_replace(array("\r\n", "\r"), "\n", $s); |
|
| 183 | } |
|
| 184 | ||
| 185 | if (preg_match('/[\x80-\xFF]/', $s)) { |
|
| 186 | if (Normalizer::isNormalized($s, $normalization_form)) { |
|
| @@ 2356-2359 (lines=4) @@ | ||
| 2353 | } |
|
| 2354 | break; |
|
| 2355 | case 'string': |
|
| 2356 | if (false !== strpos($var, "\r")) { |
|
| 2357 | // Workaround https://bugs.php.net/65732 |
|
| 2358 | $var = str_replace(array("\r\n", "\r"), "\n", $var); |
|
| 2359 | } |
|
| 2360 | if (preg_match('/[\x80-\xFF]/', $var)) { |
|
| 2361 | if (Normalizer::isNormalized($var, $normalization_form)) { |
|
| 2362 | $n = '-'; |
|