From: Philip Tzou Date: Tue, 21 Dec 2010 15:27:23 +0000 (+0000) Subject: Fix the bug when a math image was contained by an "" tag, there will be extra... X-Git-Tag: 1.31.0-rc.0~33220 X-Git-Url: http://git.cyclocoop.org//%27http:/jquery.khurshid.com/ifixpng.php/%27?a=commitdiff_plain;h=fa8fb431e7cd1d16ce687b366f64469614eee5fa;p=lhc%2Fweb%2Fwiklou.git Fix the bug when a math image was contained by an "" tag, there will be extra markup -{R| and }-. Since the -{ and }- has been escaped, the Raw (-{R|text}-) markup are no longer needed. --- diff --git a/languages/LanguageConverter.php b/languages/LanguageConverter.php index 083874cac4..26923b6c28 100644 --- a/languages/LanguageConverter.php +++ b/languages/LanguageConverter.php @@ -983,11 +983,10 @@ class LanguageConverter { * Wrap math into rawoutput -{R| math }- syntax. */ public function armourMath( $text ) { - // we need to convert '-{' and '}-' to '-{' and '}-' - // to avoid a unwanted '}-' appeared after the math-image. + // convert '-{' and '}-' to '-{' and '}-' to prevent + // any unwanted markup appearing in the math image tag. $text = strtr( $text, array( '-{' => '-{', '}-' => '}-' ) ); - $ret = "-{R|$text}-"; - return $ret; + return $text; } /**