Example of failing test:
----------------------
Running test Magic links: RFC (bug 479)... FAILED!
--- /tmp/mwParser-
1109840392-expected 2006-11-08 05:39:04.
000000000 +0000
+++ /tmp/mwParser-
1109840392-actual 2006-11-08 05:39:04.
000000000 +0000
@@ -1,2 +1,2 @@
-<p><a href="http://www.ietf.org/rfc/rfc822.txt" class="external" title="http://www.ietf.org/rfc/rfc822.txt">RFC 822</a>
+<p><a href="http://www.ietf.org/rfc/rfc822.txt" class="external " title="http://www.ietf.org/rfc/rfc822.txt" rel="nofollow">RFC 822</a>
</p>
----------------------
Also applied to the "BUG 1887: A RFC with a thumbnail" and "RFC code coverage" tests.
* @todo document
* @static
*/
- protected static function getExternalLinkAttributes( $link, $text, $class='' ) {
+ public static function getExternalLinkAttributes( $link, $text, $class='' ) {
$link = htmlspecialchars( $link );
$r = ($class != '') ? " class=\"$class\"" : " class=\"external\"";
}
$url = wfMsg( $urlmsg, $id );
- $text = Linker::makeExternalLink( $url, "$keyword $id" );
+ $la = Linker::getExternalLinkAttributes( $url, "$keyword $id" );
+ $text = "<a href=\"{$url}\"{$la}>{$keyword} {$id}</a>";
}
return $text;
}