| @@ 2566-2569 (lines=4) @@ | ||
| 2563 | } |
|
| 2564 | break; |
|
| 2565 | case 'string': |
|
| 2566 | if (false !== strpos($var, "\r")) { |
|
| 2567 | // Workaround https://bugs.php.net/65732 |
|
| 2568 | $var = str_replace(array("\r\n", "\r"), "\n", $var); |
|
| 2569 | } |
|
| 2570 | if (preg_match('/[\x80-\xFF]/', $var)) { |
|
| 2571 | if (Normalizer::isNormalized($var, $normalization_form)) { |
|
| 2572 | $n = '-'; |
|
| @@ 540-543 (lines=4) @@ | ||
| 537 | */ |
|
| 538 | public static function filterString($s, $normalization_form = 4 /* n::NFC */, $leading_combining = '◌') |
|
| 539 | { |
|
| 540 | if (false !== strpos($s, "\r")) { |
|
| 541 | // Workaround https://bugs.php.net/65732 |
|
| 542 | $s = str_replace(array("\r\n", "\r"), "\n", $s); |
|
| 543 | } |
|
| 544 | ||
| 545 | if (preg_match('/[\x80-\xFF]/', $s)) { |
|
| 546 | if (Normalizer::isNormalized($s, $normalization_form)) { |
|