Linker::getInternalLinkAttributes() is an horrible old thing that I
would like to deprecate, and that's the last usage of it I could find.
Change-Id: Icbda801bf8240cf2e4e23d6b99406e3a909e9d0b
if ( $wgOut->isArticleRelated() ) {
if ( $title->getNamespace() == NS_FILE ) {
- $name = $title->getDBkey();
$image = wfFindFile( $title );
if ( $image ) {
- $link = htmlspecialchars( $image->getURL() );
- $style = Linker::getInternalLinkAttributes( $link, $name );
- $s[] = "<a href=\"{$link}\"{$style}>{$name}</a>";
+ $href = $image->getURL();
+ $s[] = Html::element( 'a', array( 'href' => $href,
+ 'title' => $href ), $title->getText() );
+
}
}
}