The PNG output of <math> 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}^ $
* (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 <math> always be left-to-right.
=== API changes in 1.18 ===
* (bug 26339) Throw warning when truncating an overlarge API result
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 ('<span class="tex">$ ' . str_replace( "\n", " ", htmlspecialchars( $this->tex ) ) . ' $</span>');
+ return ('<span class="tex" dir="ltr">$ ' . str_replace( "\n", " ", htmlspecialchars( $this->tex ) ) . ' $</span>');
}
if( $this->tex == '' ) {
return; # bug 8372
} else {
return Xml::tags( 'span',
$this->_attribs( 'span',
- array( 'class' => 'texhtml' ) ),
+ array( 'class' => 'texhtml',
+ 'dir' => 'ltr'
+ ) ),
$this->html );
}
}