Skip to content

Commit

Permalink
MDL-69911 core: Clean content passed through TeX filter
Browse files Browse the repository at this point in the history
  • Loading branch information
mickhawkins authored and Jenkins committed Jan 12, 2021
1 parent ce87be7 commit 11e13d1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions filter/tex/filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,9 @@ function filter($text, array $options = array()) {
continue;
}

// Sanitize the decoded string, because filter_text_image() injects the final string between script tags.
$texexp = clean_param($texexp, PARAM_TEXT);

$md5 = md5($texexp);
if (!$DB->record_exists("cache_filters", array("filter"=>"tex", "md5key"=>$md5))) {
$texcache = new stdClass();
Expand Down

0 comments on commit 11e13d1

Please sign in to comment.