r25598 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r25597‎ | r25598 | r25599 >
Date:19:42, 6 September 2007
Author:tlaqua
Status:old
Tags:
Comment:
Refining EditPage::pseudoParseSectionAnchor function (partial fix for 2831 - now calls Parser::doQuotes() to parse wikitext quotes)
Modified paths:
  • /trunk/phase3/includes/EditPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/EditPage.php
@@ -1625,13 +1625,18 @@
16261626
16271627 # Strip internal link markup
16281628 $text = preg_replace('/\[\[:?([^[|]+)\|([^[]+)\]\]/','$2',$text);
1629 - $text = preg_replace('/\[\[:?([^[]+)\]\]/','$1',$text);
 1629+ $text = preg_replace('/\[\[:?([^[]+)\|?\]\]/','$1',$text);
16301630
16311631 # Strip external link markup (FIXME: Not Tolerant to blank link text
16321632 # I.E. [http://www.mediawiki.org] will render as [1] or something depending
16331633 # on how many empty links there are on the page - need to figure that out.
16341634 $text = preg_replace('/\[(?:' . wfUrlProtocols() . ')([^ ]+?) ([^[]+)\]/','$2',$text);
16351635
 1636+ # Parse wikitext quotes (italics & bold)
 1637+ $text = Parser::doQuotes($text);
 1638+
 1639+ # Strip HTML tags
 1640+ $text = preg_replace( '/<.*?' . '>/', '', $text );
16361641 return $text;
16371642 }
16381643

Follow-up revisions

RevisionCommit summaryAuthorDate
r25607Merged revisions 25530-25606 via svnmerge from...david06:11, 7 September 2007

Status & tagging log