MDL-15810 whitelist _blank target in htmlpurifier cleaning; merged from MOODLE_19_STABLE

This commit is contained in:
skodak
2008-09-24 21:39:47 +00:00
parent 67d7aa437a
commit 3c24a39108
+1
View File
@@ -1886,6 +1886,7 @@ function purify_html($text) {
$config->set('HTML', 'Doctype', 'XHTML 1.0 Transitional');
$config->set('Cache', 'SerializerPath', $cachedir);
$config->set('URI', 'AllowedSchemes', array('http'=>1, 'https'=>1, 'ftp'=>1, 'irc'=>1, 'nntp'=>1, 'news'=>1, 'rtsp'=>1, 'teamspeak'=>1, 'gopher'=>1, 'mms'=>1));
$config->set('Attr', 'AllowedFrameTargets', array('_blank'));
$purifier = new HTMLPurifier($config);
}
return $purifier->purify($text);