summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-03-11 11:54:04 -0500
committerEvan Prodromou <evan@status.net>2010-03-21 17:41:37 -0500
commit8f071b2818e8321ea910df612016175f65093402 (patch)
treeaa2970c0fcc648fb3fcc3246af01543f5c435b5b
parentdfa785e9ae6116e51fcab96d36288334f0503970 (diff)
scrub magic quotes from HTML in TinyMCE
-rw-r--r--plugins/TinyMCE/TinyMCEPlugin.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/plugins/TinyMCE/TinyMCEPlugin.php b/plugins/TinyMCE/TinyMCEPlugin.php
index c0fd8506e..f8d85c1ba 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;
+ }
+ }
}