From: Brian Wolff Date: Tue, 5 Apr 2011 19:51:22 +0000 (+0000) Subject: (bug 28430) Make HTML and TeX output of tags be LTR always X-Git-Tag: 1.31.0-rc.0~31007 X-Git-Url: http://git.cyclocoop.org/fichier?a=commitdiff_plain;h=0a9b4efd973d321a94372c337e71a51266376562;p=lhc%2Fweb%2Fwiklou.git (bug 28430) Make HTML and TeX output of tags be LTR always The PNG output of is always LTR regardless of content language, and since we switch back and forth between PNG/html depending on how complicated the formula is, we should be consistent. Also according to the bug always doing LTR even on RTL langs is appearently correct behaviour. Also change for plain TeX output to be LTR, as otherwise the TeX commands don't really make sense if $ ^{355} $ gets turned into $ {355}^ $ --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index af3a1da61f..b2f62d8a45 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -225,6 +225,7 @@ PHP if you have not done so prior to upgrading MediaWiki. * (bug 28417) Fix PHP notice when importing revision without a listed id * (bug 28394) Set forgotten parameters types in ApiUnblock * (bug 28395) Set forgotten parameters types in ApiParse +* (bug 28430) Make html and TeX output of always be left-to-right. === API changes in 1.18 === * (bug 26339) Throw warning when truncating an overlarge API result diff --git a/includes/Math.php b/includes/Math.php index 0e136d5f95..c9be6f4de1 100644 --- a/includes/Math.php +++ b/includes/Math.php @@ -38,7 +38,7 @@ class MathRenderer { if( $this->mode == MW_MATH_SOURCE ) { # No need to render or parse anything more! # New lines are replaced with spaces, which avoids confusing our parser (bugs 23190, 22818) - return ('$ ' . str_replace( "\n", " ", htmlspecialchars( $this->tex ) ) . ' $'); + return ('$ ' . str_replace( "\n", " ", htmlspecialchars( $this->tex ) ) . ' $'); } if( $this->tex == '' ) { return; # bug 8372 @@ -288,7 +288,9 @@ class MathRenderer { } else { return Xml::tags( 'span', $this->_attribs( 'span', - array( 'class' => 'texhtml' ) ), + array( 'class' => 'texhtml', + 'dir' => 'ltr' + ) ), $this->html ); } }