$this->mTitle->getPrefixedDBkey() );
}
}
+
+ # Wrap non-interface parser output in a <div> so it can be targeted
+ # with CSS (T37247)
+ $class = $this->mOptions->getWrapOutputClass();
+ if ( $class !== false && !$this->mOptions->getInterfaceMessage() ) {
+ $text = Html::rawElement( 'div', [ 'class' => $class ], $text );
+ }
+
$this->mOutput->setText( $text );
$this->mRevisionId = $oldRevisionId;
true, 'free',
$this->getExternalLinkAttribs( $url ), $this->mTitle );
# Register it in the output object...
- # Replace unnecessary URL escape codes with their equivalent characters
- $pasteurized = self::normalizeLinkUrl( $url );
- $this->mOutput->addExternalLink( $pasteurized );
+ $this->mOutput->addExternalLink( $url );
}
return $text . $trail;
}
$this->getExternalLinkAttribs( $url ), $this->mTitle ) . $dtrail . $trail;
# Register link in the output object.
- # Replace unnecessary URL escape codes with the referenced character
- # This prevents spammers from hiding links from the filters
- $pasteurized = self::normalizeLinkUrl( $url );
- $this->mOutput->addExternalLink( $pasteurized );
+ $this->mOutput->addExternalLink( $url );
}
return $s;
$text = '<span class="error">'
. wfMessage( 'parser-template-loop-warning', $titleText )->inContentLanguage()->text()
. '</span>';
+ $this->addTrackingCategory( 'template-loop-category' );
wfDebug( __METHOD__ . ": template loop broken at '$titleText'\n" );
}
}
if ( !$title->equals( $cacheTitle ) ) {
$this->mTplRedirCache[$cacheTitle->getPrefixedDBkey()] =
- [ $title->getNamespace(), $cdb = $title->getDBkey() ];
+ [ $title->getNamespace(), $title->getDBkey() ];
}
return [ $dom, $title ];
$ig->setShowFilename( false );
$ig->setParser( $this );
$ig->setHideBadImages();
- $ig->setAttributes( Sanitizer::validateTagAttributes( $params, 'table' ) );
+ $ig->setAttributes( Sanitizer::validateTagAttributes( $params, 'ul' ) );
if ( isset( $params['showfilename'] ) ) {
$ig->setShowFilename( true );
}
if ( preg_match( "/^($prots)$addr$chars*$/u", $linkValue ) ) {
$link = $linkValue;
+ $this->mOutput->addExternalLink( $link );
} else {
$localLinkTitle = Title::newFromText( $linkValue );
if ( $localLinkTitle !== null ) {
+ $this->mOutput->addLink( $localLinkTitle );
$link = $localLinkTitle->getLinkURL();
}
}
$internalParamMap = [];
foreach ( $internalParamNames as $type => $names ) {
foreach ( $names as $name ) {
+ // For grep: img_left, img_right, img_center, img_none,
+ // img_baseline, img_sub, img_super, img_top, img_text_top, img_middle,
+ // img_bottom, img_text_bottom,
+ // img_thumbnail, img_manualthumb, img_framed, img_frameless, img_upright,
+ // img_border, img_link, img_alt, img_class
$magicName = str_replace( '-', '_', "img_$name" );
$internalParamMap[$magicName] = [ $type, $name ];
}