User "Platonides" posted a comment on MediaWiki.r103476.

Full URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/103476#c26194
Commit summary:

(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!
$

Comment:

If you want to make them completely plaintext, I'd early exit 
WikiPage::doEditUpdates() for those pages (similarly on how their special 
presentation is set on Article, not in parse).


_______________________________________________
MediaWiki-CodeReview mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview

Reply via email to