diff options
author | Derek Jones <derek.jones@ellislab.com> | 2008-12-05 23:03:47 +0100 |
---|---|---|
committer | Derek Jones <derek.jones@ellislab.com> | 2008-12-05 23:03:47 +0100 |
commit | ab0e31f09a8cf3596e6547fc47fd085a0d2bcdd0 (patch) | |
tree | 67e7afe72eb45425474b88f72cb7446f35dea71a /system/libraries | |
parent | 272d30a8ec4fc2a6ff42359cff859f9c030a6a1d (diff) |
fixed a bug where whitespace would be lost if a string was forced into a character entity e.g.
&foo you know?
would become
&foo;you know?
instead of
&foo; you know?
Diffstat (limited to 'system/libraries')
-rw-r--r-- | system/libraries/Input.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/system/libraries/Input.php b/system/libraries/Input.php index f26df7552..347aac3ac 100644 --- a/system/libraries/Input.php +++ b/system/libraries/Input.php @@ -555,7 +555,7 @@ class CI_Input { * the conversion of entities to ASCII later. * */ - $str = preg_replace('#(&\#?[0-9a-z]{2,})[\x00-\x20]*;?#i', "\\1;", $str); + $str = preg_replace('#(&\#?[0-9a-z]{2,})([\x00-\x20])*;?#i', "\\1;\\2", $str); /* * Validate UTF16 two byte encoding (x00) |