diff options
author | Ivan Tcholakov <ivantcholakov@gmail.com> | 2016-02-07 20:33:46 +0100 |
---|---|---|
committer | Ivan Tcholakov <ivantcholakov@gmail.com> | 2016-02-07 20:33:46 +0100 |
commit | 9fee9e450372963e0869ed4fe034acebc74b7a81 (patch) | |
tree | b1ef0583566a6a41ecb3200e05b5b75bde7cb1eb /system/helpers/inflector_helper.php | |
parent | c52ff48f7449b25719fde942757f6043a2d14dde (diff) |
hunanize() helper: Escaping the $separator argument.
Diffstat (limited to 'system/helpers/inflector_helper.php')
-rw-r--r-- | system/helpers/inflector_helper.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/system/helpers/inflector_helper.php b/system/helpers/inflector_helper.php index 96b723c8d..c064d8de4 100644 --- a/system/helpers/inflector_helper.php +++ b/system/helpers/inflector_helper.php @@ -219,7 +219,7 @@ if ( ! function_exists('humanize')) */ function humanize($str, $separator = '_') { - return ucwords(preg_replace('/['.$separator.']+/', ' ', trim(MB_ENABLED ? mb_strtolower($str) : strtolower($str)))); + return ucwords(preg_replace('/['.preg_quote($separator).']+/', ' ', trim(MB_ENABLED ? mb_strtolower($str) : strtolower($str)))); } } |