r2967 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r2966‎ | r2967 | r2968 >
Date:19:56, 4 April 2004
Author:gabrielwicke
Status:old
Tags:
Comment:
* some fiddling with the remaining pre-inside-p problem
* ' also stripped
Modified paths:
  • /trunk/phase3/includes/Parser.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Parser.php
@@ -177,9 +177,9 @@
178178 $text = Parser::extractTags("pre", $text, $pre_content, $uniq_prefix);
179179 foreach( $pre_content as $marker => $content ){
180180 if( $render ){
181 - $pre_content[$marker] = "<pre>" . wfEscapeHTMLTagsOnly( $content ) . "</pre>";
 181+ $pre_content[$marker] = "\n<pre>" . wfEscapeHTMLTagsOnly( $content ) . "</pre>";
182182 } else {
183 - $pre_content[$marker] = "<pre>$content</pre>";
 183+ $pre_content[$marker] = "\n<pre>$content</pre>";
184184 }
185185 }
186186
@@ -1038,6 +1038,7 @@
10391039 if ( ! $inBlockElem ) {
10401040 if ( " " == $t{0} ) {
10411041 $newSection = "pre";
 1042+ $text .= $this->closeParagraph();
10421043 # $t = wfEscapeHTML( $t );
10431044 }
10441045 else { $newSection = "p"; }
@@ -1474,7 +1475,7 @@
14751476 # strip out HTML
14761477 $canonized_headline = preg_replace( "/<.*?" . ">/","",$canonized_headline );
14771478 $tocline = trim( $canonized_headline );
1478 - $canonized_headline = preg_replace("/[ &\\/<>\\(\\)\\[\\]=,+]+/", '_', html_entity_decode( $tocline));
 1479+ $canonized_headline = preg_replace("/[ &\\/<>\\(\\)\\[\\]=,+']+/", '_', html_entity_decode( $tocline));
14791480 $refer[$headlineCount] = $canonized_headline;
14801481
14811482 # count how many in assoc. array so we can track dupes in anchors

Status & tagging log