From: Gabriel Wicke Date: Sun, 4 Apr 2004 19:56:14 +0000 (+0000) Subject: * some fiddling with the remaining pre-inside-p problem X-Git-Tag: 1.3.0beta1~600 X-Git-Url: https://git.cyclocoop.org/admin/?a=commitdiff_plain;h=a2bb8422d2c4d7eaf8d4d3f8286ac2d3195f2b83;p=lhc%2Fweb%2Fwiklou.git * some fiddling with the remaining pre-inside-p problem * ' also stripped --- diff --git a/includes/Parser.php b/includes/Parser.php index 6b16ba41ae..80d70bcd9a 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -177,9 +177,9 @@ class Parser $text = Parser::extractTags("pre", $text, $pre_content, $uniq_prefix); foreach( $pre_content as $marker => $content ){ if( $render ){ - $pre_content[$marker] = "
" . wfEscapeHTMLTagsOnly( $content ) . "
"; + $pre_content[$marker] = "\n
" . wfEscapeHTMLTagsOnly( $content ) . "
"; } else { - $pre_content[$marker] = "
$content
"; + $pre_content[$marker] = "\n
$content
"; } } @@ -1038,6 +1038,7 @@ class Parser if ( ! $inBlockElem ) { if ( " " == $t{0} ) { $newSection = "pre"; + $text .= $this->closeParagraph(); # $t = wfEscapeHTML( $t ); } else { $newSection = "p"; } @@ -1474,7 +1475,7 @@ class Parser # strip out HTML $canonized_headline = preg_replace( "/<.*?" . ">/","",$canonized_headline ); $tocline = trim( $canonized_headline ); - $canonized_headline = preg_replace("/[ &\\/<>\\(\\)\\[\\]=,+]+/", '_', html_entity_decode( $tocline)); + $canonized_headline = preg_replace("/[ &\\/<>\\(\\)\\[\\]=,+']+/", '_', html_entity_decode( $tocline)); $refer[$headlineCount] = $canonized_headline; # count how many in assoc. array so we can track dupes in anchors