$latex = new latex();
$density = $CFG->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 );
$gif = "$latex->temp_dir/$md5.gif";
// put the expression as a file into the temp area
+ $expression = html_entity_decode( $expression );
+ $output .= "<p>Processing TeX expression:</p><pre>$expression</pre>\n";
$doc = $latex->construct_latex_document( $expression );
$fh = fopen( $tex, 'w' );
fputs( $fh, $doc );