From: Gabriel Wicke Date: Sun, 4 Apr 2004 14:15:11 +0000 (+0000) Subject: tocline was missing X-Git-Tag: 1.3.0beta1~603 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmes_infos.php?a=commitdiff_plain;h=e02c22b0273ebba686d0705f609cdb68d8c9da60;p=lhc%2Fweb%2Fwiklou.git tocline was missing --- 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