diff options
author | diegorivera <diego6616@yahoo.com.ar> | 2011-10-19 06:56:15 +0200 |
---|---|---|
committer | Phil Sturgeon <email@philsturgeon.co.uk> | 2011-10-27 00:57:22 +0200 |
commit | 13095cbc1b1b0509ac8c984e7a5fd704d9826569 (patch) | |
tree | eb244b8680a49467c16f2be665649a1399837c5c | |
parent | e8349294d8638dac1e689d137188bb7c7c7c19c5 (diff) |
Update 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 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; } |