diff options
author | Derek Jones <derek.jones@ellislab.com> | 2011-10-19 16:41:58 +0200 |
---|---|---|
committer | Derek Jones <derek.jones@ellislab.com> | 2011-10-19 16:41:58 +0200 |
commit | bc844cc6c5b80863b06877596121a00f461ea691 (patch) | |
tree | 6294f5cae6edc231624c0584f2a473a8ea88bb88 /system/libraries/Email.php | |
parent | 23af23e52eb3c7dd4f4261f833b40c2242d2504b (diff) | |
parent | 2b9aa8f0252a233404ec0a8ba2db68e91a8c6fa6 (diff) |
Merge pull request #595 from diegorivera/patch-1
Update system/libraries/Email.php
Diffstat (limited to 'system/libraries/Email.php')
-rw-r--r-- | system/libraries/Email.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/system/libraries/Email.php b/system/libraries/Email.php index ef20e1978..c7d0bc52b 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -381,7 +381,15 @@ class CI_Email { */ public function message($body) { - $this->_body = stripslashes(rtrim(str_replace("\r", "", $body))); + $this->_body = rtrim(str_replace("\r", "", $body)); + + //strip slashes only if magic quotes is ON + //if we do it with magic quotes OFF, it strips real, user-inputted chars. + if (get_magic_quotes_gpc()) + { + $this->_body = stripslashes($this->_body); + } + return $this; } |