Parser: Allow disabling magic link functionality
authorKunal Mehta <legoktm@member.fsf.org>
Fri, 9 Sep 2016 07:28:49 +0000 (00:28 -0700)
committerKunal Mehta <legoktm@member.fsf.org>
Tue, 13 Sep 2016 05:00:05 +0000 (22:00 -0700)
commit78debba3aabc17b482b1881b7009546a1a48755a
treed3ba87643c4d771f329fbe5a51052e197b10caa2
parentf7811092e7f7d73e32dc8f2545fc0f168a4b9d06
Parser: Allow disabling magic link functionality

The magic link functionality is "old backwards-compatibility baggage"
that we probably want to get rid of eventually. The first step to doing
so would be making it configurable and allowing it to be turned off on
wikis that don't use it.

This adds each of the 3 magic link types as individual parser options,
which can be controlled by the $wgEnableMagicLinks setting.

Additionally, wfEscapeWikiText() was updated to only escape enabled
magic link types.

Bug: T47942
Change-Id: If63965f31d17da4b864510146e0018da1cae188c
includes/DefaultSettings.php
includes/GlobalFunctions.php
includes/parser/Parser.php
includes/parser/ParserOptions.php
tests/parser/ParserTestRunner.php
tests/parser/parserTests.txt