r78679 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78678‎ | r78679 | r78680 >
Date:15:27, 21 December 2010
Author:philip
Status:ok (Comments)
Tags:
Comment:
Fix the bug when a math image was contained by an "<a>" tag, there will be extra markup -{R| and }-.
Since the -{ and }- has been escaped, the Raw (-{R|text}-) markup are no longer needed.
Modified paths:
  • /trunk/phase3/languages/LanguageConverter.php (modified) (history)

Diff [purge]

Index: trunk/phase3/languages/LanguageConverter.php
@@ -983,11 +983,10 @@
984984 * Wrap math into rawoutput -{R| math }- syntax.
985985 */
986986 public function armourMath( $text ) {
987 - // we need to convert '-{' and '}-' to '-&#123;' and '&#125;-'
988 - // to avoid a unwanted '}-' appeared after the math-image.
 987+ // convert '-{' and '}-' to '-&#123;' and '&#125;-' to prevent
 988+ // any unwanted markup appearing in the math image tag.
989989 $text = strtr( $text, array( '-{' => '-&#123;', '}-' => '&#125;-' ) );
990 - $ret = "-{R|$text}-";
991 - return $ret;
 990+ return $text;
992991 }
993992
994993 /**

Follow-up revisions

RevisionCommit summaryAuthorDate
r79129MFT r78011 r78014 r78015 r78016 r78099 r78117 r78161 r78170 r78172 r78199 r78......platonides19:58, 28 December 2010
r79653follow r78679, correct the comment linephilip16:44, 5 January 2011

Comments

#Comment by Liangent (talk | contribs)   06:41, 22 December 2010

Please correct the comment line above the function as well.

Status & tagging log