scrub magic quotes from HTML in TinyMCE

This commit is contained in:
Evan Prodromou 2010-03-11 11:54:04 -05:00
parent dfa785e9ae
commit 8f071b2818

View File

@ -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;
}
}
}