| @@ 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)) { |
|
| @@ 1885-1888 (lines=4) @@ | ||
| 1882 | } |
|
| 1883 | break; |
|
| 1884 | case 'string': |
|
| 1885 | if (false !== strpos($var, "\r")) { |
|
| 1886 | // Workaround https://bugs.php.net/65732 |
|
| 1887 | $var = str_replace(array("\r\n", "\r"), "\n", $var); |
|
| 1888 | } |
|
| 1889 | if (preg_match('/[\x80-\xFF]/', $var)) { |
|
| 1890 | if (Normalizer::isNormalized($var, $normalization_form)) { |
|
| 1891 | $n = '-'; |
|