From: Gabriel Wicke Date: Thu, 15 Apr 2004 14:59:46 +0000 (+0000) Subject: move fixtag replacement before doBlockLevels to avoid div inside pre X-Git-Tag: 1.3.0beta1~426 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=c23cb2c9c2bed2f0f98119463f96af0c349b98cf;p=lhc%2Fweb%2Fwiklou.git move fixtag replacement before doBlockLevels to avoid div inside pre --- diff --git a/includes/Parser.php b/includes/Parser.php index 9404f905ad..f03d195dec 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -91,10 +91,8 @@ class Parser $stripState = NULL; $text = $this->strip( $text, $this->mStripState ); $text = $this->internalParse( $text, $linestart ); - # only once and next-to-last $text = $this->unstrip( $text, $this->mStripState ); - $text = $this->doBlockLevels( $text, $linestart ); - # Clean up special characters, only run once and last + # Clean up special characters, only run once, next-to-last before doBlockLevels $fixtags = array( "/
/i" => '
', "/
/i" => '
', @@ -104,6 +102,8 @@ class Parser # more careful about named entities. '/&(?!:amp;|#[Xx][0-9A-fa-f]+;|#[0-9]+;|[a-zA-Z0-9]+;)/' => '&' ); + # only once and last + $text = $this->doBlockLevels( $text, $linestart ); $text = preg_replace( array_keys($fixtags), array_values($fixtags), $text ); $this->mOutput->setText( $text );