alt text formatting- keep image src on one line to play nice with the parser
authorGabriel Wicke <gwicke@users.mediawiki.org>
Mon, 17 May 2004 00:14:42 +0000 (00:14 +0000)
committerGabriel Wicke <gwicke@users.mediawiki.org>
Mon, 17 May 2004 00:14:42 +0000 (00:14 +0000)
includes/Math.php

index cbe2cc0..5946061 100644 (file)
@@ -189,7 +189,7 @@ class MathRenderer {
        function _linkToMathImage() {
                global $wgMathPath;
                $url = htmlspecialchars( "$wgMathPath/{$this->hash}.png" );
-               $alt = htmlspecialchars( $this->tex );
+               $alt = trim(str_replace("\n", ' ', htmlspecialchars( $this->tex )));
                return "<img class='tex' src=\"$url\" alt=\"$alt\" />";
        }