From 07caf142d7dc7da5d2c09990860aca73e137b2bf Mon Sep 17 00:00:00 2001 From: thepurpleblob Date: Tue, 11 Sep 2007 13:55:33 +0000 Subject: [PATCH] MDL-10092: Decode HTML entities before processing. Merged from STABLE_18 --- filter/tex/latex.php | 2 +- filter/tex/pix.php | 3 ++- filter/tex/texdebug.php | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/filter/tex/latex.php b/filter/tex/latex.php index d00c94b3a..b476683bd 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 e4224ecd3..3b2ad1e21 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 ); -- 2.11.4.GIT