From 9483bcb4eeab6b05c37813b69aa7f4fa93e29491 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sat, 17 Dec 2005 20:48:51 +0000 Subject: [PATCH] Add force option to sanitize() --- kernel.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kernel.php b/kernel.php index 8652c0c..fcd7a44 100644 --- a/kernel.php +++ b/kernel.php @@ -597,12 +597,13 @@ class Shared_Object_Framework * @access public * * @param string Unsanitzed text + * @param bool Force magic quotes off? * * @return string Properly protected text that only encodes potential threats */ - function sanitize($text) + function sanitize($text, $force = false) { - if ($this->magicquotes) + if ($this->magicquotes AND !$force) { return str_replace(array('<', '>', '\"', '"'), array('<', '>', '"', '"'), $text); } -- 2.22.5