From a2bb8422d2c4d7eaf8d4d3f8286ac2d3195f2b83 Mon Sep 17 00:00:00 2001 From: Gabriel Wicke Date: Sun, 4 Apr 2004 19:56:14 +0000 Subject: [PATCH] * some fiddling with the remaining pre-inside-p problem * ' also stripped --- includes/Parser.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 -- 2.20.1