From: Tim Laqua Date: Thu, 6 Sep 2007 19:42:53 +0000 (+0000) Subject: Refining EditPage::pseudoParseSectionAnchor function (partial fix for 2831 - now... X-Git-Tag: 1.31.0-rc.0~51492 X-Git-Url: https://git.cyclocoop.org/admin/%7B%7Blocalurl:Special:UserLogin%7D%7D?a=commitdiff_plain;h=8a98694365337e8fdceb2debe31c15f51d41d766;p=lhc%2Fweb%2Fwiklou.git Refining EditPage::pseudoParseSectionAnchor function (partial fix for 2831 - now calls Parser::doQuotes() to parse wikitext quotes) --- 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; }