From 8f071b2818e8321ea910df612016175f65093402 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Thu, 11 Mar 2010 11:54:04 -0500 Subject: [PATCH] scrub magic quotes from HTML in TinyMCE --- plugins/TinyMCE/TinyMCEPlugin.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/plugins/TinyMCE/TinyMCEPlugin.php b/plugins/TinyMCE/TinyMCEPlugin.php index c0fd8506ed..f8d85c1ba0 100644 --- a/plugins/TinyMCE/TinyMCEPlugin.php +++ b/plugins/TinyMCE/TinyMCEPlugin.php @@ -85,7 +85,7 @@ class TinyMCEPlugin extends Plugin return true; } - $raw = $args['status_textarea']; + $raw = $this->_scrub($args['status_textarea']); require_once INSTALLDIR.'/extlib/htmLawed/htmLawed.php'; @@ -127,5 +127,15 @@ END_OF_SCRIPT; return $scr; } + + function _scrub($txt) + { + $strip = get_magic_quotes_gpc(); + if ($strip) { + return stripslashes($txt); + } else { + return $txt; + } + } } -- 2.39.5