summaryrefslogtreecommitdiffstats
path: root/system/libraries/Email.php
diff options
context:
space:
mode:
authorTimothy Warren <tim@timshomepage.net>2011-10-19 12:54:19 +0200
committerTimothy Warren <tim@timshomepage.net>2011-10-19 12:54:19 +0200
commit739e5f8dcf9eb0cef101bbc177955036bdeefa5a (patch)
treebccef79f09611de288273feff477b0e01def0bf4 /system/libraries/Email.php
parenta0c6a2486ec91d78fa54e18fee7a0c69dff0c151 (diff)
parentbc844cc6c5b80863b06877596121a00f461ea691 (diff)
Merge branch 'develop' of git://github.com/EllisLab/CodeIgniter into develop
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;
}