| @@ 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)) { |
|
| @@ 2403-2406 (lines=4) @@ | ||
| 2400 | } |
|
| 2401 | break; |
|
| 2402 | case 'string': |
|
| 2403 | if (false !== strpos($var, "\r")) { |
|
| 2404 | // Workaround https://bugs.php.net/65732 |
|
| 2405 | $var = str_replace(array("\r\n", "\r"), "\n", $var); |
|
| 2406 | } |
|
| 2407 | if (preg_match('/[\x80-\xFF]/', $var)) { |
|
| 2408 | if (\Normalizer::isNormalized($var, $normalization_form)) { |
|
| 2409 | $n = '-'; |
|