Index: trunk/phase3/includes/Parser.php |
— | — | @@ -1456,28 +1456,21 @@ |
1457 | 1457 | $s .= $prefix . $sk->makeKnownLinkObj( $nt, $text, '', $trail ); |
1458 | 1458 | continue; |
1459 | 1459 | } |
1460 | | - if( !$nt->isExternal() && $nt->isAlwaysKnown() ) { |
1461 | | - /** |
1462 | | - * Skip lookups for special pages and self-links. |
1463 | | - * External interwiki links are not included here because |
1464 | | - * the HTTP urls would break output in the next parse step; |
1465 | | - * they will have placeholders kept. |
1466 | | - */ |
1467 | | - $s .= $sk->makeKnownLinkObj( $nt, $text, '', $trail, $prefix ); |
1468 | | - } else { |
1469 | | - /** |
1470 | | - * Add a link placeholder |
1471 | | - * Later, this will be replaced by a real link, after the existence or |
1472 | | - * non-existence of all the links is known |
1473 | | - */ |
1474 | | - $s .= $this->makeLinkHolder( $nt, $text, '', $trail, $prefix ); |
1475 | | - } |
| 1460 | + $s .= $this->makeLinkHolder( $nt, $text, '', $trail, $prefix ); |
1476 | 1461 | } |
1477 | 1462 | wfProfileOut( $fname ); |
1478 | 1463 | return $s; |
1479 | 1464 | } |
1480 | 1465 | |
1481 | 1466 | /** |
| 1467 | + * Hardens some text possibly containing URLs against mangling by |
| 1468 | + * replaceExternalLinks() |
| 1469 | + */ |
| 1470 | + function hardenURLs( $text ) { |
| 1471 | + return str_replace( 'http://', 'http-noparse://', $text ); |
| 1472 | + } |
| 1473 | + |
| 1474 | + /** |
1482 | 1475 | * Make a link placeholder. The text returned can be later resolved to a real link with |
1483 | 1476 | * replaceLinkHolders(). This is done for two reasons: firstly to avoid further |
1484 | 1477 | * parsing of interwiki links, and secondly to allow all extistence checks and |
— | — | @@ -3023,7 +3016,7 @@ |
3024 | 3017 | $pdbk = $pdbks[$key] = $title->getPrefixedDBkey(); |
3025 | 3018 | |
3026 | 3019 | # Check if it's in the link cache already |
3027 | | - if ( $wgLinkCache->getGoodLinkID( $pdbk ) ) { |
| 3020 | + if ( $title->isAlwaysKnown() || $wgLinkCache->getGoodLinkID( $pdbk ) ) { |
3028 | 3021 | $colours[$pdbk] = 1; |
3029 | 3022 | } elseif ( $wgLinkCache->isBadLink( $pdbk ) ) { |
3030 | 3023 | $colours[$pdbk] = 0; |