r25292 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r25291‎ | r25292 | r25293 >
Date:16:10, 29 August 2007
Author:simetrical
Status:old
Tags:
Comment:
Reinstate r25260 with fix (missing trim()). No additional parser tests are broken relative to trunk.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Parser.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Parser.php
@@ -3641,12 +3641,21 @@
36423642 "\$this->mInterwikiLinkHolders['texts'][\$1]",
36433643 $canonized_headline );
36443644
3645 - # strip out HTML
3646 - $canonized_headline = preg_replace( '/<.*?' . '>/','',$canonized_headline );
3647 - $tocline = trim( $canonized_headline );
 3645+ # Strip out HTML (other than plain <sup> and <sub>: bug 8393)
 3646+ $tocline = preg_replace(
 3647+ array( '#<(?!/?(sup|sub)).*?'.'>#', '#<(/?(sup|sub)).*?'.'>#' ),
 3648+ array( '', '<$1>'),
 3649+ $canonized_headline
 3650+ );
 3651+ $tocline = trim( $tocline );
 3652+
 3653+ # For the anchor, strip out HTML-y stuff period
 3654+ $canonized_headline = preg_replace( '/<.*?'.'>/', '', $canonized_headline );
 3655+ $canonized_headline = trim( $canonized_headline );
 3656+
36483657 # Save headline for section edit hint before it's escaped
3649 - $headline_hint = trim( $canonized_headline );
3650 - $canonized_headline = Sanitizer::escapeId( $tocline );
 3658+ $headline_hint = $canonized_headline;
 3659+ $canonized_headline = Sanitizer::escapeId( $canonized_headline );
36513660 $refers[$headlineCount] = $canonized_headline;
36523661
36533662 # count how many in assoc. array so we can track dupes in anchors
Index: trunk/phase3/RELEASE-NOTES
@@ -424,6 +424,8 @@
425425 * (bug 11072) Fix regression in API image history query
426426 * (bug 10985) Resolved cached entries on Special:DoubleRedirects were being
427427 supressed, breaking paging - now strikes out "fixed" results
 428+* (bug 8393) <sup> and <sub> need to be preserved (without attributes) for
 429+ entries in the table of contents
428430
429431 == API changes since 1.10 ==
430432

Follow-up revisions

RevisionCommit summaryAuthorDate
r25303Merged revisions 25215-25302 via svnmerge from...david07:10, 30 August 2007

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r25260(bug 8393) <sup> and <sub> need to be preserved (without attributes) for entr...simetrical00:06, 29 August 2007

Status & tagging log