From d8d8b99f5b6d8fd62c3874ad1f8481c9a568aa9d Mon Sep 17 00:00:00 2001 From: Wil Mahan Date: Mon, 20 Sep 2004 16:05:37 +0000 Subject: [PATCH] Fix small corner case in HTML comment removal --- includes/Parser.php | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/includes/Parser.php b/includes/Parser.php index ba915f8887..237704be98 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -1858,11 +1858,15 @@ class Parser return $text; } - # Remove '', and everything between. - # To avoid leaving blank lines, when a comment is both preceded - # and followed by a newline (ignoring spaces), trim leading and - # trailing spaces and one of the newlines. - /* private */ function removeHTMLcomments( $text ) { + /** + * Remove '', and everything between. + * To avoid leaving blank lines, when a comment is both preceded + * and followed by a newline (ignoring spaces), trim leading and + * trailing spaces and one of the newlines. + * + * @access private + */ + function removeHTMLcomments( $text ) { $fname='Parser::removeHTMLcomments'; wfProfileIn( $fname ); while (($start = strpos($text, '