diff options
author | Andrey Andreev <narf@devilix.net> | 2013-10-30 22:07:23 +0100 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2013-10-30 22:07:23 +0100 |
commit | 99f9b9a70a153c93705033b5be81d5d666468675 (patch) | |
tree | c4a6bb5895db091d64fa33d80425cacc8195326f /system/core | |
parent | ac4d30862241c61637b2138fa97da131e5b07c1f (diff) |
Escape PCRE delimiters
Diffstat (limited to 'system/core')
-rw-r--r-- | system/core/Output.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/system/core/Output.php b/system/core/Output.php index cae1347bc..0b11a5abc 100644 --- a/system/core/Output.php +++ b/system/core/Output.php @@ -868,7 +868,7 @@ class CI_Output { { $patterns = array( '#\n?//[^\n]*#' => '', // Remove // line comments - '#\s*([!#%&()*+,\-./:;<=>?@\[\]^`{|}~])\s*#' => '$1', // Remove spaces following and preceeding JS-wise non-special & non-word characters + '#\s*([!\#%&()*+,\-./:;<=>?@\[\]^`{|}~])\s*#' => '$1', // Remove spaces following and preceeding JS-wise non-special & non-word characters '#\s{2,}#' => ' ' // Reduce the remaining multiple whitespace characters to a single space ); } @@ -877,7 +877,7 @@ class CI_Output { $patterns = array( '#/\*.*(?=\*/)\*/#s' => '', // Remove /* block comments */ '#\n?//[^\n]*#' => '', // Remove // line comments - '#\s*([^\w.#%)\s*#U' => '$1', // Remove spaces following and preceeding non-word characters, excluding dots, hashes and the percent sign + '#\s*([^\w.\#%])\s*#U' => '$1', // Remove spaces following and preceeding non-word characters, excluding dots, hashes and the percent sign '#\s{2,}#' => ' ' // Reduce the remaining multiple space characters to a single space ); } |