From: Evan Prodromou Date: Thu, 11 Mar 2010 16:54:04 +0000 (-0500) Subject: scrub magic quotes from HTML in TinyMCE X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=8f071b2818e8321ea910df612016175f65093402;p=quix0rs-gnu-social.git scrub magic quotes from HTML in TinyMCE --- 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; + } + } }