https://bugzilla.wikimedia.org/show_bug.cgi?id=36059
Richard Morris <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED | --- Comment #33 from Richard Morris <[email protected]> 2012-06-24 18:24:23 UTC --- I don't think the fix is quite correct as it introduces problems for the source option. What I think you want is: 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 Xml::element( 'span', $this->_attribs( 'span', array( 'class' => 'tex', 'dir' => 'ltr' ) ), '$ ' . str_replace( "\n", " ", htmlspecialchars($this->tex) ) . ' $' ); } if( $this->mode == MW_MATH_MATHJAX ) { # No need to render or parse anything more! # New lines are replaced with spaces, which avoids confusing our parser (bugs 23190, 22818) return Xml::element( 'span', $this->_attribs( 'span', array( 'class' => 'tex', 'dir' => 'ltr' ) ), '$ ' . str_replace( "\n", " ", $this->tex ) . ' $' ); } You want to call htmlspecialchars in MW_MATH_SOURCE but not MW_MATH_MATHJAX. You might also want to mention the bug in the comments. -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
