Index: trunk/phase3/includes/EditPage.php |
— | — | @@ -1625,13 +1625,18 @@ |
1626 | 1626 | |
1627 | 1627 | # Strip internal link markup |
1628 | 1628 | $text = preg_replace('/\[\[:?([^[|]+)\|([^[]+)\]\]/','$2',$text); |
1629 | | - $text = preg_replace('/\[\[:?([^[]+)\]\]/','$1',$text); |
| 1629 | + $text = preg_replace('/\[\[:?([^[]+)\|?\]\]/','$1',$text); |
1630 | 1630 | |
1631 | 1631 | # Strip external link markup (FIXME: Not Tolerant to blank link text |
1632 | 1632 | # I.E. [http://www.mediawiki.org] will render as [1] or something depending |
1633 | 1633 | # on how many empty links there are on the page - need to figure that out. |
1634 | 1634 | $text = preg_replace('/\[(?:' . wfUrlProtocols() . ')([^ ]+?) ([^[]+)\]/','$2',$text); |
1635 | 1635 | |
| 1636 | + # Parse wikitext quotes (italics & bold) |
| 1637 | + $text = Parser::doQuotes($text); |
| 1638 | + |
| 1639 | + # Strip HTML tags |
| 1640 | + $text = preg_replace( '/<.*?' . '>/', '', $text ); |
1636 | 1641 | return $text; |
1637 | 1642 | } |
1638 | 1643 | |