Skip to content

Commit

Permalink
MDL-24223 same basic support for "safe" flash embedding
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed Sep 21, 2010
1 parent 25b0d32 commit cbe44fb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/weblib.php
Expand Up @@ -1511,6 +1511,11 @@ function purify_html($text) {
$config->set('URI.AllowedSchemes', array('http'=>true, 'https'=>true, 'ftp'=>true, 'irc'=>true, 'nntp'=>true, 'news'=>true, 'rtsp'=>true, 'teamspeak'=>true, 'gopher'=>true, 'mms'=>true));
$config->set('Attr.AllowedFrameTargets', array('_blank'));

if (!empty($CFG->allowobjectembed)) {
$config->set('HTML.SafeObject', true);
$config->set('Output.FlashCompat', true);
}

$def = $config->getHTMLDefinition(true);
$def->addElement('nolink', 'Block', 'Flow', array()); // skip our filters inside
$def->addElement('tex', 'Inline', 'Inline', array()); // tex syntax, equivalent to $$xx$$
Expand Down

0 comments on commit cbe44fb

Please sign in to comment.