* (bug 11072) Fix regression in API image history query
* (bug 10985) Resolved cached entries on Special:DoubleRedirects were being
supressed, breaking paging - now strikes out "fixed" results
+* (bug 8393) <sup> and <sub> need to be preserved (without attributes) for
+ entries in the table of contents
== API changes since 1.10 ==
"\$this->mInterwikiLinkHolders['texts'][\$1]",
$canonized_headline );
- # strip out HTML
- $canonized_headline = preg_replace( '/<.*?' . '>/','',$canonized_headline );
- $tocline = trim( $canonized_headline );
+ # Strip out HTML (other than plain <sup> and <sub>: bug 8393)
+ $tocline = preg_replace(
+ array( '#<(?!/?(sup|sub)).*?'.'>#', '#<(/?(sup|sub)).*?'.'>#' ),
+ array( '', '<$1>'),
+ $canonized_headline
+ );
+ $tocline = trim( $tocline );
+
+ # For the anchor, strip out HTML-y stuff period
+ $canonized_headline = preg_replace( '/<.*?'.'>/', '', $canonized_headline );
+
# Save headline for section edit hint before it's escaped
$headline_hint = trim( $canonized_headline );
- $canonized_headline = Sanitizer::escapeId( $tocline );
+ $canonized_headline = Sanitizer::escapeId( $canonized_headline );
$refers[$headlineCount] = $canonized_headline;
# count how many in assoc. array so we can track dupes in anchors