CoreParserFunctions::displaytitle(): Use Parser::killMarkers()
authorKevin Israel <pleasestand@live.com>
Mon, 20 Oct 2014 06:52:02 +0000 (02:52 -0400)
committerOri.livneh <ori@wikimedia.org>
Mon, 20 Oct 2014 15:59:51 +0000 (15:59 +0000)
... instead of doing something similar to an old version of it.

Change-Id: I78db194291236208843a13b80d322d403774796c

includes/parser/CoreParserFunctions.php

index 355a3c1..d45b32f 100644 (file)
@@ -379,8 +379,7 @@ class CoreParserFunctions {
                $text = $parser->doQuotes( $text );
 
                // remove stripped text (e.g. the UNIQ-QINU stuff) that was generated by tag extensions/whatever
-               $text = preg_replace( '/' . preg_quote( $parser->uniqPrefix(), '/' ) . '.*?'
-                       . preg_quote( Parser::MARKER_SUFFIX, '/' ) . '/', '', $text );
+               $text = $parser->killMarkers( $text );
 
                // list of disallowed tags for DISPLAYTITLE
                // these will be escaped even though they are allowed in normal wiki text