Index: includes/Parser.php =================================================================== RCS file: /cvsroot/blahtex/blahtex/includes/Parser.php,v retrieving revision 1.1.1.4 diff -c -r1.1.1.4 Parser.php *** includes/Parser.php 23 Mar 2006 10:12:09 -0000 1.1.1.4 --- includes/Parser.php 24 Mar 2006 10:27:28 -0000 *************** *** 582,587 **** --- 582,590 ---- * will be used depending on availability. Override the default * $wgTidyInternal setting to disable the internal if it's not working. * + * Since html tidy does not understand MathML, we temporarily replace + * all ... with placeholders. + * * @param string $text Hideous HTML input * @return string Corrected HTML output * @access public *************** *** 589,594 **** --- 592,600 ---- */ function tidy( $text ) { global $wgTidyInternal; + $math_content = array(); + $text = Parser::extractTagsAndParams( 'math', $text, $math_content, + $math_tags, $math_params, $this->mUniqPrefix ); $wrappedtext = ''. 'test'.$text.''; *************** *** 600,605 **** --- 606,615 ---- if( is_null( $correctedtext ) ) { wfDebug( "Tidy error detected!\n" ); return $text . "\n\n"; + } + foreach( $math_content as $marker => $content ) { + $full_tag = $math_tags[$marker] . $content . ""; + $correctedtext = str_replace( $marker, $full_tag, $correctedtext ); } return $correctedtext; }