From e02c22b0273ebba686d0705f609cdb68d8c9da60 Mon Sep 17 00:00:00 2001 From: Gabriel Wicke Date: Sun, 4 Apr 2004 14:15:11 +0000 Subject: [PATCH] tocline was missing --- includes/Parser.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/includes/Parser.php b/includes/Parser.php index bb8dff9475..b5e8c67d8c 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -420,6 +420,8 @@ class Parser $text = str_replace ( "
", "
", $text ); $text = str_replace ( "
", "
", $text ); $text = str_replace ( "
", "
", $text ); + $text = str_replace ( '
', '', $text ); + $text = str_replace ( '
', '', $text ); $text = $this->doHeadings( $text ); @@ -1270,7 +1272,7 @@ class Parser $htmlpairs = array( # Tags that must be closed "b", "i", "u", "font", "big", "small", "sub", "sup", "h1", "h2", "h3", "h4", "h5", "h6", "cite", "code", "em", "s", - "strike", "strong", "tt", "var", "div", "center", + "strike", "strong", "tt", "var", "div", "span", "blockquote", "ol", "ul", "dl", "table", "caption", "pre", "ruby", "rt" , "rb" , "rp", "p" ); @@ -1469,8 +1471,8 @@ class Parser # strip out HTML $canonized_headline = preg_replace( "/<.*?" . ">/","",$canonized_headline ); - - $canonized_headline = preg_replace("/[ &\\/<>\\(\\)\\[\\]=,+]+/", '_', html_entity_decode(trim( $canonized_headline ))); + $tocline = trim( $canonized_headline ); + $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