diff options
author | Andrey Andreev <narf@devilix.net> | 2016-02-08 11:27:31 +0100 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2016-02-08 11:27:31 +0100 |
commit | c6cf171a4e9cf14d74e8787ce0a13b6affeb7aec (patch) | |
tree | b1ef0583566a6a41ecb3200e05b5b75bde7cb1eb | |
parent | c52ff48f7449b25719fde942757f6043a2d14dde (diff) | |
parent | 9fee9e450372963e0869ed4fe034acebc74b7a81 (diff) |
Merge pull request #4437 from ivantcholakov/3.0-stable
Escape the $separator parameter for humanize() inflector helper
-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)))); } } |