From: thepurpleblob Date: Tue, 11 Sep 2007 13:55:33 +0000 (+0000) Subject: MDL-10092: X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=07caf142d7dc7da5d2c09990860aca73e137b2bf;p=moodle.git MDL-10092: Decode HTML entities before processing. Merged from STABLE_18 --- diff --git a/filter/tex/latex.php b/filter/tex/latex.php index d00c94b3a1..b476683bda 100644 --- a/filter/tex/latex.php +++ b/filter/tex/latex.php @@ -1,4 +1,4 @@ -filter_tex_density; $background = $CFG->filter_tex_latexbackground; - $latex_path = $latex->render( $texcache->rawtext, $md5, 12, $density, $background ); + $texexp = html_entity_decode( $texcache->rawtext ); + $latex_path = $latex->render( $texexp, $md5, 12, $density, $background ); if ($latex_path) { copy( $latex_path, $pathname ); $latex->clean_up( $md5 ); diff --git a/filter/tex/texdebug.php b/filter/tex/texdebug.php index e4224ecd31..3b2ad1e21b 100644 --- a/filter/tex/texdebug.php +++ b/filter/tex/texdebug.php @@ -254,6 +254,8 @@ $gif = "$latex->temp_dir/$md5.gif"; // put the expression as a file into the temp area + $expression = html_entity_decode( $expression ); + $output .= "

Processing TeX expression:

$expression
\n"; $doc = $latex->construct_latex_document( $expression ); $fh = fopen( $tex, 'w' ); fputs( $fh, $doc );