Index: trunk/phase3/includes/parser/Parser.php |
— | — | @@ -1643,6 +1643,12 @@ |
1644 | 1644 | * @private |
1645 | 1645 | */ |
1646 | 1646 | function replaceInternalLinks( $s ) { |
| 1647 | + if( $this->getTitle()->isCssOrJsPage() ) { |
| 1648 | + # bug 32450 : js and script pages in MediaWiki: namespace do not want |
| 1649 | + # to get their code or comments altered. Think about js string: |
| 1650 | + # var foobar = "[[Category:" + $catname + "]]; |
| 1651 | + return $s; |
| 1652 | + } |
1647 | 1653 | $this->mLinkHolders->merge( $this->replaceInternalLinks2( $s ) ); |
1648 | 1654 | return $s; |
1649 | 1655 | } |
— | — | @@ -1913,14 +1919,6 @@ |
1914 | 1920 | |
1915 | 1921 | if ( $ns == NS_CATEGORY ) { |
1916 | 1922 | wfProfileIn( __METHOD__."-category" ); |
1917 | | - if( $this->getTitle()->isCssOrJsPage() ) { |
1918 | | - # bug 32450 : js and script pages in MediaWiki: namespace do not want |
1919 | | - # to get their code or comments altered. Think about js string: |
1920 | | - # var foobar = "[[Category:" + $catname + "]]; |
1921 | | - $s .= "[[$text]]$trail"; |
1922 | | - wfProfileOut( __METHOD__."-category" ); |
1923 | | - continue; |
1924 | | - } |
1925 | 1923 | $s = rtrim( $s . "\n" ); # bug 87 |
1926 | 1924 | |
1927 | 1925 | if ( $wasblank ) { |