summaryrefslogtreecommitdiffstats
path: root/system/libraries/Email.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2011-10-20 08:22:12 +0200
committerAndrey Andreev <narf@bofh.bg>2011-10-20 08:22:12 +0200
commitd8442dd015d9e16929825bc51f3cac25c2f74c73 (patch)
treeb9d1a059683b0e31cf056150cc375941a91be252 /system/libraries/Email.php
parent56b21e1233855e9ea87ece7bb92e7994042b9cb3 (diff)
parent9fca615492ba481f5c27890b3b61f0603f45c55b (diff)
Merge remote-tracking branch 'upstream/develop' into ci-oci8-driver-php5
Diffstat (limited to 'system/libraries/Email.php')
-rw-r--r--system/libraries/Email.php10
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;
}