(bug 32450) MediaWiki: .js|.css pages parsed [[Category:#]] links
authorAntoine Musso <hashar@users.mediawiki.org>
Thu, 17 Nov 2011 16:46:45 +0000 (16:46 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Thu, 17 Nov 2011 16:46:45 +0000 (16:46 +0000)
commit78562bd14c97b05b38bf12c93ca730a9586cfc91
tree6c9847164974aafb8e3f7fc913c5ca7ad4b4df93
parent171ac0a31b4cb18ed7bac0cf3faf121272790103
(bug 32450) MediaWiki: .js|.css pages parsed [[Category:#]] links

This patch skip the [[Category:#]] parsing logic when the Title is in
NS_MEDIAWIKI and ends with .js or .css. This way the code is kept as is
and pages are no more categorized.

How to reproduce the issue:

$ echo 'var foo = "[[Category:bug32450]]"' \
| php maintenance/parse.php --title MediaWiki:Foobar.js
<p>var foo = ""
</p>
$

Note how the text got stripped.

After this patch:

$ echo 'var foo = "[[Category:bug32450]]"' \
| php maintenance/parse.php --title MediaWiki:Foobar.js
<p>var foo = "[[Category:bug32450]]"
</p>
$

TEST PLAN:
==========

$ php parserTests.php --quiet
This is MediaWiki version 1.19alpha (r103473).

Reading tests from "tests/parser/parserTests.txt"...
Reading tests from "tests/parser/extraParserTests.txt"...
Passed 654 of 654 tests (100%)... ALL TESTS PASSED!
$
RELEASE-NOTES-1.19
includes/parser/Parser.php
tests/parser/parserTests.txt