BUG#1131 Fix headings containing interwiki links
This commit is contained in:
parent
24d8299089
commit
0957c04743
1 changed files with 4 additions and 1 deletions
|
|
@ -2376,7 +2376,7 @@ class Parser
|
|||
* @access private
|
||||
*/
|
||||
/* private */ function formatHeadings( $text, $isMain=true ) {
|
||||
global $wgInputEncoding, $wgMaxTocLevel, $wgContLang, $wgLinkHolders;
|
||||
global $wgInputEncoding, $wgMaxTocLevel, $wgContLang, $wgLinkHolders, $wgInterwikiLinkHolders;
|
||||
|
||||
$doNumberHeadings = $this->mOptions->getNumberHeadings();
|
||||
$doShowToc = $this->mOptions->getShowToc();
|
||||
|
|
@ -2540,6 +2540,9 @@ class Parser
|
|||
$canonized_headline = preg_replace( '/<!--LINK ([0-9]*)-->/e',
|
||||
"\$wgLinkHolders['texts'][\$1]",
|
||||
$canonized_headline );
|
||||
$canonized_headline = preg_replace( '/<!--IWLINK ([0-9]*)-->/e',
|
||||
"\$wgInterwikiLinkHolders[\$1]",
|
||||
$canonized_headline );
|
||||
|
||||
# strip out HTML
|
||||
$canonized_headline = preg_replace( '/<.*?' . '>/','',$canonized_headline );
|
||||
|
|
|
|||
Loading…
Reference in a new issue