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