# 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;
}