| @@ 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)) { |
|
| @@ 2664-2667 (lines=4) @@ | ||
| 2661 | } |
|
| 2662 | break; |
|
| 2663 | case 'string': |
|
| 2664 | if (false !== strpos($var, "\r")) { |
|
| 2665 | // Workaround https://bugs.php.net/65732 |
|
| 2666 | $var = str_replace(array("\r\n", "\r"), "\n", $var); |
|
| 2667 | } |
|
| 2668 | if (preg_match('/[\x80-\xFF]/', $var)) { |
|
| 2669 | if (Normalizer::isNormalized($var, $normalization_form)) { |
|
| 2670 | $n = '-'; |
|