MDL-10092:
Decode HTML entities before processing. Merged from STABLE_18
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php // $Id$
|
||||
// latex.php
|
||||
// render TeX stuff using latex - this will not work on all platforms
|
||||
// or configurations. Only works on Linux and Mac with appropriate
|
||||
|
||||
+2
-1
@@ -56,7 +56,8 @@
|
||||
$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 );
|
||||
|
||||
@@ -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 .= "<p>Processing TeX expression:</p><pre>$expression</pre>\n";
|
||||
$doc = $latex->construct_latex_document( $expression );
|
||||
$fh = fopen( $tex, 'w' );
|
||||
fputs( $fh, $doc );
|
||||
|
||||
Reference in New Issue
Block a user