- $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() );
+