r17481 MediaWiki - Code Review archive
Repository:
MediaWiki
Revision:
<
r17480
|
r17481
|
r17482
>
Date:
06:03, 8 November 2006
Author:
nickj
Status:
old
Tags:
Comment:
Fix parserTests regression introduced in
r17479
.
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.
Modified paths:
/trunk/phase3/includes/Linker.php
(modified) (
history
)
/trunk/phase3/includes/Parser.php
(modified) (
history
)
Diff
[
purge
]
Index: trunk/phase3/includes/Linker.php
—
—
@@ -29,7 +29,7 @@
30
30
* @todo document
31
31
* @static
32
32
*/
33
- protected static function getExternalLinkAttributes( $link, $text, $class='' ) {
33
+ public static function getExternalLinkAttributes( $link, $text, $class='' ) {
34
34
$link = htmlspecialchars( $link );
35
35
36
36
$r = ($class != '') ? " class=\"$class\"" : " class=\"external\"";
Index: trunk/phase3/includes/Parser.php
—
—
@@ -1038,7 +1038,8 @@
1039
1039
}
1040
1040
1041
1041
$url = wfMsg( $urlmsg, $id );
1042
- $text = Linker::makeExternalLink( $url, "$keyword $id" );
1042
+ $la = Linker::getExternalLinkAttributes( $url, "$keyword $id" );
1043
+ $text = "<a href=\"{$url}\"{$la}>{$keyword} {$id}</a>";
1043
1044
}
1044
1045
return $text;
1045
1046
}
Follow-up revisions
Revision
Commit summary
Author
Date
r35828
Revert
r35819
-- broke thumbnailing....
brion
23:46, 3 June 2008
Past revisions this follows-up on
Revision
Commit summary
Author
Date
r5327
bug 479
: parsing [[RFC 1234]] as internal link
hashar
15:54, 20 September 2004
r5335
Fix
bug 479
: parsing [[RFC 1234]] as internal link...
hashar
21:41, 20 September 2004
r5551
Fix problem with RFC magic links, as noted at
bug 479
wmahan
17:59, 26 September 2004
r9548
* (
bug 1887
) Applying attachment 461
avar
13:48, 21 June 2005
r9617
* Marking the two RFC testcases as being parsertests for
bug 479
avar
12:56, 24 June 2005
r13307
Collected updates:...
gabrielwicke
17:10, 24 March 2006
r17479
* (
bug 7405
) Make Linker methods static. Patch by Dan Li.
nickj
05:21, 8 November 2006