| @@ 178-181 (lines=4) @@ | ||
| 175 | */ |
|
| 176 | public static function filterString($s, $normalization_form = 4 /* n::NFC */, $leading_combining = '◌') |
|
| 177 | { |
|
| 178 | if (false !== strpos($s, "\r")) { |
|
| 179 | // Workaround https://bugs.php.net/65732 |
|
| 180 | $s = str_replace(array("\r\n", "\r"), "\n", $s); |
|
| 181 | } |
|
| 182 | ||
| 183 | if (preg_match('/[\x80-\xFF]/', $s)) { |
|
| 184 | if (Normalizer::isNormalized($s, $normalization_form)) { |
|
| @@ 2731-2734 (lines=4) @@ | ||
| 2728 | } |
|
| 2729 | break; |
|
| 2730 | case 'string': |
|
| 2731 | if (false !== strpos($var, "\r")) { |
|
| 2732 | // Workaround https://bugs.php.net/65732 |
|
| 2733 | $var = str_replace(array("\r\n", "\r"), "\n", $var); |
|
| 2734 | } |
|
| 2735 | if (preg_match('/[\x80-\xFF]/', $var)) { |
|
| 2736 | if (Normalizer::isNormalized($var, $normalization_form)) { |
|
| 2737 | $n = '-'; |
|