From 88590383e51978787ab32ccb495e63991903a741 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Mon, 21 Feb 2005 04:53:18 +0000 Subject: [PATCH] Added a parameter to ISSO::unsanitize to force magic quotes to be off (which is needed by ISSO::Mail if we don't want escaped quotes in the mail). --- kernel.php | 5 +++-- mail.php | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/kernel.php b/kernel.php index e6d70b8..81a5ca2 100644 --- a/kernel.php +++ b/kernel.php @@ -403,12 +403,13 @@ class Shared_Object_Framework * Takes text that has been processed for HTML and unsanitizes it * * @param str Text that needs to be turned back into HTML + * @param bool Force magicquotes off * * @return str Unsanitized text */ - function unsanitize($text) + function unsanitize($text, $force = false) { - if ($this->magicquotes) + if ($this->magicquotes AND !$force) { return str_replace(array('<', '>', '"'), array('<', '>', '\"'), $text); } diff --git a/mail.php b/mail.php index 3516682..8cc168a 100644 --- a/mail.php +++ b/mail.php @@ -70,7 +70,7 @@ class Mail } else { - $this->from = trim($_isso->unsanitize($this->from)); + $this->from = trim($_isso->unsanitize($this->from, true)); } if (!$this->fromname) @@ -79,7 +79,7 @@ class Mail } else { - $this->fromname = trim($_isso->unsanitize($this->fromname)); + $this->fromname = trim($_isso->unsanitize($this->fromname, true)); } if (!$this->to) @@ -99,7 +99,7 @@ class Mail } else { - $this->subject = trim($_isso->unsanitize($this->_fetch_first_line($this->subject))); + $this->subject = trim($_isso->unsanitize($this->_fetch_first_line($this->subject), true)); } if (!$this->body) @@ -110,7 +110,7 @@ class Mail else { $this->body = $this->_convert_line_breaks($this->body); - $this->body = trim($_isso->unsanitize($this->body)); + $this->body = trim($_isso->unsanitize($this->body, true)); } $this->headers = $this->_convert_line_breaks($this->headers); -- 2.22.5