forgot to move the actual preg_match as well, p instead of div for center
authorGabriel Wicke <gwicke@users.mediawiki.org>
Thu, 15 Apr 2004 16:01:39 +0000 (16:01 +0000)
committerGabriel Wicke <gwicke@users.mediawiki.org>
Thu, 15 Apr 2004 16:01:39 +0000 (16:01 +0000)
includes/Parser.php

index f03d195..49fdedc 100644 (file)
@@ -96,15 +96,16 @@ class Parser
                $fixtags = array(
                        "/<hr *>/i" => '<hr/>',
                        "/<br *>/i" => '<br/>',
-                       "/<center *>/i"=>'<div style="text-align:center;">',
-                       "/<\\/center *>/i" => '</div>',
+                       "/<center *>/i"=>'<p style="text-align:center;">',
+                       "/<\\/center *>/i" => '</p>',
                        # Clean up spare ampersands; note that we probably ought to be
                        # more careful about named entities.
                        '/&(?!:amp;|#[Xx][0-9A-fa-f]+;|#[0-9]+;|[a-zA-Z0-9]+;)/' => '&amp;'
                );
+               $text = preg_replace( array_keys($fixtags), array_values($fixtags), $text );
+
                # only once and last
                $text = $this->doBlockLevels( $text, $linestart );
-               $text = preg_replace( array_keys($fixtags), array_values($fixtags), $text );
 
                $this->mOutput->setText( $text );
                wfProfileOut( $fname );