if ( $t->hasFragment() ) {
# Strip the fragment to avoid various odd effects
- $this->mTitle = clone $t;
- $this->mTitle->setFragment( '' );
+ $this->mTitle = $t->createFragmentTarget( '' );
} else {
$this->mTitle = $t;
}
// Implies both are valid for table headings.
if ( $first_character === '!' ) {
- $line = str_replace( '!!', '||', $line );
+ $line = StringUtils::replaceMarkup( '!!', '||', $line );
}
# Split up multiple cells on the same line.
*
* @private
*
- * @param string $text
- * @param bool $isMain
- * @param PPFrame|bool $frame
+ * @param string $text The text to parse
+ * @param bool $isMain Whether this is being called from the main parse() function
+ * @param PPFrame|bool $frame A pre-processor frame
*
* @return string
*/
$value = wfEscapeWikiText( $this->mTitle->getRootText() );
break;
case 'rootpagenamee':
- $value = wfEscapeWikiText( wfUrlEncode( str_replace(
+ $value = wfEscapeWikiText( wfUrlencode( str_replace(
' ',
'_',
$this->mTitle->getRootText()
$value = wfEscapeWikiText( $this->mTitle->getBaseText() );
break;
case 'basepagenamee':
- $value = wfEscapeWikiText( wfUrlEncode( str_replace(
+ $value = wfEscapeWikiText( wfUrlencode( str_replace(
' ',
'_',
$this->mTitle->getBaseText()