summaryrefslogtreecommitdiffstats
path: root/system/libraries
diff options
context:
space:
mode:
Diffstat (limited to 'system/libraries')
-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 e28c23a04..2916b9a13 100644
--- a/system/libraries/Email.php
+++ b/system/libraries/Email.php
@@ -379,7 +379,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;
}