diff options
Diffstat (limited to 'includes/MagicWord.php')
-rw-r--r-- | includes/MagicWord.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/includes/MagicWord.php b/includes/MagicWord.php index 68cbe345..60bfd0f4 100644 --- a/includes/MagicWord.php +++ b/includes/MagicWord.php @@ -101,6 +101,7 @@ class MagicWord { 'contentlanguage', 'pagesinnamespace', 'numberofadmins', + 'defaultsort', ); static public $mObjects = array(); @@ -289,7 +290,7 @@ class MagicWord { * Used in matchAndRemove() * @private **/ - function pregRemoveAndRecord( $match ) { + function pregRemoveAndRecord( ) { $this->mFound = true; return ''; } @@ -298,7 +299,7 @@ class MagicWord { * Replaces the word with something else */ function replace( $replacement, $subject, $limit=-1 ) { - $res = preg_replace( $this->getRegex(), wfRegexReplacement( $replacement ), $subject, $limit ); + $res = preg_replace( $this->getRegex(), StringUtils::escapeRegexReplacement( $replacement ), $subject, $limit ); $this->mModified = !($res === $subject); return $res; } |