From: Rotem Liss Date: Tue, 2 Jun 2009 19:32:51 +0000 (+0000) Subject: Multiple whitespace in TOC anchors is now stripped, for consistency with the link... X-Git-Tag: 1.31.0-rc.0~41536 X-Git-Url: http://git.cyclocoop.org/ecrire?a=commitdiff_plain;h=b57bce94c52fbec1e56c69429047f422c4d8cb49;p=lhc%2Fweb%2Fwiklou.git Multiple whitespace in TOC anchors is now stripped, for consistency with the link from the edit comment. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 5f6918662f..c764c4c494 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -183,6 +183,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 19017) TOC level calculation error in an odd case * (bug 18999) CSS update for RTL interwiki links * (bug 18925) history.js removes class names of list elements on initialization +* Multiple whitespace in TOC anchors is now stripped, for consistency with the + link from the edit comment == API changes in 1.16 == diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 27f55f7d98..9d6e98eb97 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -3543,6 +3543,7 @@ class Parser # For the anchor, strip out HTML-y stuff period $safeHeadline = preg_replace( '/<.*?'.'>/', '', $safeHeadline ); + $safeHeadline = preg_replace( '/[ _]+/', ' ', $safeHeadline ); $safeHeadline = trim( $safeHeadline ); # Save headline for section edit hint before it's escaped