mirror of
https://github.com/moodle/moodle.git
synced 2025-08-09 02:46:40 +02:00
MDL-10092:
Decode HTML entities before processing.
This commit is contained in:
parent
12b7c16ffc
commit
1c632b934d
3 changed files with 5 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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 );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue