Skip to content

Commit

Permalink
Allow video source tag work with htmlpurifier #2133
Browse files Browse the repository at this point in the history
  • Loading branch information
jmontoyaa committed Sep 8, 2017
1 parent 805b0aa commit 1f34a8d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main/inc/lib/formvalidator/Rule/allowed_tags.inc.php
Expand Up @@ -316,6 +316,9 @@
$allowed_tags_student['video']['controls'] = array();
$allowed_tags_student['video']['id'] = array();

$allowed_tags_student['source'] = array();
$allowed_tags_student['source']['type'] = array();
$allowed_tags_student['source']['src'] = array();

// font
$allowed_tags_student['font'] = array();
Expand Down
7 changes: 7 additions & 0 deletions main/inc/lib/security.lib.php
Expand Up @@ -380,6 +380,13 @@ public static function remove_XSS($var, $user_status = null, $filter_terms = fal
'controls' => 'Bool',
)
);
$def->addElement(
'source',
'Block',
'Flow',
'Common',
array('src' => 'URI', 'type' => 'Text',)
);
}

$purifier[$user_status] = new HTMLPurifier($config);
Expand Down

0 comments on commit 1f34a8d

Please sign in to comment.