| @@ 2564-2567 (lines=4) @@ | ||
| 2561 | } |
|
| 2562 | break; |
|
| 2563 | case 'string': |
|
| 2564 | if (false !== strpos($var, "\r")) { |
|
| 2565 | // Workaround https://bugs.php.net/65732 |
|
| 2566 | $var = str_replace(array("\r\n", "\r"), "\n", $var); |
|
| 2567 | } |
|
| 2568 | if (preg_match('/[\x80-\xFF]/', $var)) { |
|
| 2569 | if (Normalizer::isNormalized($var, $normalization_form)) { |
|
| 2570 | $n = '-'; |
|
| @@ 175-178 (lines=4) @@ | ||
| 172 | */ |
|
| 173 | public static function filterString($s, $normalization_form = 4 /* n::NFC */, $leading_combining = '◌') |
|
| 174 | { |
|
| 175 | if (false !== strpos($s, "\r")) { |
|
| 176 | // Workaround https://bugs.php.net/65732 |
|
| 177 | $s = str_replace(array("\r\n", "\r"), "\n", $s); |
|
| 178 | } |
|
| 179 | ||
| 180 | if (preg_match('/[\x80-\xFF]/', $s)) { |
|
| 181 | if (Normalizer::isNormalized($s, $normalization_form)) { |
|