String split format fix for non ascii characters
Currently just abort and return string as is
This commit is contained in:
1 parent
1795d3ba6c
commit
7e6474195b
3 files changed
+22
-1
No files matched your search
@@ -35,6 +35,14 @@ class Strings
|
||||
if (empty($split_format)) {
|
||||
return $value;
|
||||
}
|
||||
// if not in the valid ASCII character range
|
||||
// might need some tweaking
|
||||
if (preg_match('/[^\x20-\x7e]/', $value)) {
|
||||
return $value;
|
||||
}
|
||||
// if (!mb_check_encoding($value, 'ASCII')) {
|
||||
// return $value;
|
||||
// }
|
||||
$split_list = preg_split(
|
||||
// allowed split characters
|
||||
"/([" . $split_charcters . "]{1})/",
|
||||
|
||||
Reference in new issue
Block a user