Move wfEscapeWikiText() to Parser::escapeWikitext()
authorKunal Mehta <legoktm@member.fsf.org>
Wed, 14 Sep 2016 05:34:24 +0000 (22:34 -0700)
committerKunal Mehta <legoktm@member.fsf.org>
Wed, 14 Sep 2016 05:34:24 +0000 (22:34 -0700)
commitbda74bff6e180b5a6bb2cc68e12ae391d53789a3
treed64bd5437e78092c317e2613617bcfa68a8aa419
parent6e014bb7537320d69f58d3e7fbf6320488c4087e
Move wfEscapeWikiText() to Parser::escapeWikitext()

wfEscapeWikiText() used $wgEnableMagicLinks, but that could result in an
inconsistency when something modifies the magic link related
ParserOptions.

In general, most uses of wfEscapeWikiText() are in parser functions or
when message parsing, so the Parser is a logical place for it.

A future patch will make it easy to use Parser::escapeWikitext() in
message parameters.

Change-Id: I0fd4d5c135541971b1384a20328f1302b03d715f
includes/GlobalFunctions.php
includes/parser/CoreParserFunctions.php
includes/parser/Parser.php