From 8a98694365337e8fdceb2debe31c15f51d41d766 Mon Sep 17 00:00:00 2001 From: Tim Laqua Date: Thu, 6 Sep 2007 19:42:53 +0000 Subject: [PATCH] Refining EditPage::pseudoParseSectionAnchor function (partial fix for 2831 - now calls Parser::doQuotes() to parse wikitext quotes) --- includes/EditPage.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/includes/EditPage.php b/includes/EditPage.php index ad3c2b65fa..7442d11666 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -1625,13 +1625,18 @@ END # Strip internal link markup $text = preg_replace('/\[\[:?([^[|]+)\|([^[]+)\]\]/','$2',$text); - $text = preg_replace('/\[\[:?([^[]+)\]\]/','$1',$text); + $text = preg_replace('/\[\[:?([^[]+)\|?\]\]/','$1',$text); # Strip external link markup (FIXME: Not Tolerant to blank link text # I.E. [http://www.mediawiki.org] will render as [1] or something depending # on how many empty links there are on the page - need to figure that out. $text = preg_replace('/\[(?:' . wfUrlProtocols() . ')([^ ]+?) ([^[]+)\]/','$2',$text); + # Parse wikitext quotes (italics & bold) + $text = Parser::doQuotes($text); + + # Strip HTML tags + $text = preg_replace( '/<.*?' . '>/', '', $text ); return $text; } -- 2.20.1