This avoids interactions with the parser taking those new lines into account for the wikitext.
Fixes bug 22818 and bug 23190.
* (bug 19858) Removed obsolete <big> in interface messages.
* (bug 21456) "Bad title" error when showing non-local interwiki pages no longer
displays incorrect tabs
+* (bug 23190) Improved math representation for text browsers.
=== API changes in 1.17 ===
* (bug 22738) Allow filtering by action type on query=logevent
if( $this->mode == MW_MATH_SOURCE ) {
# No need to render or parse anything more!
- return ('$ '.htmlspecialchars( $this->tex ).' $');
+ # New lines are replaced with spaces, which avoids confusing our parser (bugs 23190, 22818)
+ return ('$ ' . str_replace( "\n", " ", htmlspecialchars( $this->tex ) ) . ' $');
}
if( $this->tex == '' ) {
return; # bug 8372