Index: branches/REL1_4/phase3/maintenance/parserTests.txt |
— | — | @@ -276,7 +276,7 @@ |
277 | 277 | !! input |
278 | 278 | ; http://example.com/ : definition |
279 | 279 | !! result |
280 | | -<dl><dt> <a href="http://example.com/" class='external'>http://example.com/</a> </dt><dd> definition |
| 280 | +<dl><dt> <a href="http://example.com/" class='external' rel="nofollow">http://example.com/</a> </dt><dd> definition |
281 | 281 | </dd></dl> |
282 | 282 | |
283 | 283 | !! end |
— | — | @@ -286,7 +286,7 @@ |
287 | 287 | !! input |
288 | 288 | ;[http://www.google.com/ Google]:Number one search engine |
289 | 289 | !! result |
290 | | -<dl><dt><a href="http://www.google.com/" class='external' title="http://www.google.com/">Google</a><span class='urlexpansion'> (<i>http://www.google.com/</i>)</span></dt><dd>Number one search engine |
| 290 | +<dl><dt><a href="http://www.google.com/" class='external' title="http://www.google.com/" rel="nofollow">Google</a><span class='urlexpansion'> (<i>http://www.google.com/</i>)</span></dt><dd>Number one search engine |
291 | 291 | </dd></dl> |
292 | 292 | |
293 | 293 | !! end |
— | — | @@ -307,7 +307,7 @@ |
308 | 308 | !! input |
309 | 309 | ; news:alt.wikipedia.rox: This isn't even a real newsgroup! |
310 | 310 | !! result |
311 | | -<dl><dt> <a href="news:alt.wikipedia.rox" class='external'>news:alt.wikipedia.rox</a></dt><dd> This isn't even a real newsgroup! |
| 311 | +<dl><dt> <a href="news:alt.wikipedia.rox" class='external' rel="nofollow">news:alt.wikipedia.rox</a></dt><dd> This isn't even a real newsgroup! |
312 | 312 | </dd></dl> |
313 | 313 | |
314 | 314 | !! end |
— | — | @@ -317,7 +317,7 @@ |
318 | 318 | !! input |
319 | 319 | ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop |
320 | 320 | !! result |
321 | | -<dl><dt> <a href="news:alt.wikipedia.rox" class='external'>news:alt.wikipedia.rox</a> -- don't crash or enter an infinite loop |
| 321 | +<dl><dt> <a href="news:alt.wikipedia.rox" class='external' rel="nofollow">news:alt.wikipedia.rox</a> -- don't crash or enter an infinite loop |
322 | 322 | </dt></dl> |
323 | 323 | |
324 | 324 | !! end |
— | — | @@ -327,7 +327,7 @@ |
328 | 328 | !! input |
329 | 329 | ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up |
330 | 330 | !! result |
331 | | -<dl><dt> <a href="http://www.wikipedia2.org/" class='external' title="http://www.wikipedia2.org/">Wikipedia : The Next Generation</a><span class='urlexpansion'> (<i>http://www.wikipedia2.org/</i>)</span></dt><dd> OK, I made that up |
| 331 | +<dl><dt> <a href="http://www.wikipedia2.org/" class='external' title="http://www.wikipedia2.org/" rel="nofollow">Wikipedia : The Next Generation</a><span class='urlexpansion'> (<i>http://www.wikipedia2.org/</i>)</span></dt><dd> OK, I made that up |
332 | 332 | </dd></dl> |
333 | 333 | |
334 | 334 | !! end |
— | — | @@ -341,7 +341,7 @@ |
342 | 342 | !! input |
343 | 343 | Non-bracketed: http://example.com |
344 | 344 | !! result |
345 | | -<p>Non-bracketed: <a href="http://example.com" class='external'>http://example.com</a> |
| 345 | +<p>Non-bracketed: <a href="http://example.com" class='external' rel="nofollow">http://example.com</a> |
346 | 346 | </p> |
347 | 347 | !! end |
348 | 348 | |
— | — | @@ -350,7 +350,7 @@ |
351 | 351 | !! input |
352 | 352 | Numbered: [http://example.com] |
353 | 353 | !! result |
354 | | -<p>Numbered: <a href="http://example.com" class='external' title="http://example.com">[1]</a><span class='urlexpansion'> (<i>http://example.com</i>)</span> |
| 354 | +<p>Numbered: <a href="http://example.com" class='external' title="http://example.com" rel="nofollow">[1]</a><span class='urlexpansion'> (<i>http://example.com</i>)</span> |
355 | 355 | </p> |
356 | 356 | !!end |
357 | 357 | |
— | — | @@ -359,7 +359,7 @@ |
360 | 360 | !! input |
361 | 361 | Specified text: [http://example.com link] |
362 | 362 | !! result |
363 | | -<p>Specified text: <a href="http://example.com" class='external' title="http://example.com">link</a><span class='urlexpansion'> (<i>http://example.com</i>)</span> |
| 363 | +<p>Specified text: <a href="http://example.com" class='external' title="http://example.com" rel="nofollow">link</a><span class='urlexpansion'> (<i>http://example.com</i>)</span> |
364 | 364 | </p> |
365 | 365 | !!end |
366 | 366 | |
— | — | @@ -368,7 +368,7 @@ |
369 | 369 | !! input |
370 | 370 | Trail (not sure if this is meant to work): [http://example.com link]s |
371 | 371 | !! result |
372 | | -<p>Trail (not sure if this is meant to work): <a href="http://example.com" class='external' title="http://example.com">link</a>s<span class='urlexpansion'> (<i>http://example.com</i>)</span> |
| 372 | +<p>Trail (not sure if this is meant to work): <a href="http://example.com" class='external' title="http://example.com" rel="nofollow">link</a>s<span class='urlexpansion'> (<i>http://example.com</i>)</span> |
373 | 373 | </p> |
374 | 374 | !! end |
375 | 375 | |
— | — | @@ -377,7 +377,7 @@ |
378 | 378 | !! input |
379 | 379 | http://example.com/1$2345 |
380 | 380 | !! result |
381 | | -<p><a href="http://example.com/1$2345" class='external'>http://example.com/1$2345</a> |
| 381 | +<p><a href="http://example.com/1$2345" class='external' rel="nofollow">http://example.com/1$2345</a> |
382 | 382 | </p> |
383 | 383 | !! end |
384 | 384 | |
— | — | @@ -386,7 +386,7 @@ |
387 | 387 | !! input |
388 | 388 | [http://example.com/1$2345] |
389 | 389 | !! result |
390 | | -<p><a href="http://example.com/1$2345" class='external' title="http://example.com/1$2345">[1]</a><span class='urlexpansion'> (<i>http://example.com/1$2345</i>)</span> |
| 390 | +<p><a href="http://example.com/1$2345" class='external' title="http://example.com/1$2345" rel="nofollow">[1]</a><span class='urlexpansion'> (<i>http://example.com/1$2345</i>)</span> |
391 | 391 | </p> |
392 | 392 | !!end |
393 | 393 | |
— | — | @@ -413,7 +413,7 @@ |
414 | 414 | !! input |
415 | 415 | Link to non-http image, no img tag: ftp://example.com/test.jpg |
416 | 416 | !! result |
417 | | -<p>Link to non-http image, no img tag: <a href="ftp://example.com/test.jpg" class='external'>ftp://example.com/test.jpg</a> |
| 417 | +<p>Link to non-http image, no img tag: <a href="ftp://example.com/test.jpg" class='external' rel="nofollow">ftp://example.com/test.jpg</a> |
418 | 418 | </p> |
419 | 419 | !! end |
420 | 420 | |
— | — | @@ -422,7 +422,7 @@ |
423 | 423 | !! input |
424 | 424 | Terminating separator: http://example.com/thing, |
425 | 425 | !! result |
426 | | -<p>Terminating separator: <a href="http://example.com/thing" class='external'>http://example.com/thing</a>, |
| 426 | +<p>Terminating separator: <a href="http://example.com/thing" class='external' rel="nofollow">http://example.com/thing</a>, |
427 | 427 | </p> |
428 | 428 | !! end |
429 | 429 | |
— | — | @@ -431,7 +431,7 @@ |
432 | 432 | !! input |
433 | 433 | Intervening separator: http://example.com/1,2,3 |
434 | 434 | !! result |
435 | | -<p>Intervening separator: <a href="http://example.com/1,2,3" class='external'>http://example.com/1,2,3</a> |
| 435 | +<p>Intervening separator: <a href="http://example.com/1,2,3" class='external' rel="nofollow">http://example.com/1,2,3</a> |
436 | 436 | </p> |
437 | 437 | !! end |
438 | 438 | |
— | — | @@ -440,7 +440,7 @@ |
441 | 441 | !! input |
442 | 442 | Old bug with URL in query: [http://example.com/thing?url=http://example.com link] |
443 | 443 | !! result |
444 | | -<p>Old bug with URL in query: <a href="http://example.com/thing?url=http://example.com" class='external' title="http://example.com/thing?url=http://example.com">link</a><span class='urlexpansion'> (<i>http://example.com/thing?url=http://example.com</i>)</span> |
| 444 | +<p>Old bug with URL in query: <a href="http://example.com/thing?url=http://example.com" class='external' title="http://example.com/thing?url=http://example.com" rel="nofollow">link</a><span class='urlexpansion'> (<i>http://example.com/thing?url=http://example.com</i>)</span> |
445 | 445 | </p> |
446 | 446 | !! end |
447 | 447 | |
— | — | @@ -449,7 +449,7 @@ |
450 | 450 | !! input |
451 | 451 | And again with mixed protocols: [ftp://example.com?url=http://example.com link] |
452 | 452 | !! result |
453 | | -<p>And again with mixed protocols: <a href="ftp://example.com?url=http://example.com" class='external' title="ftp://example.com?url=http://example.com">link</a><span class='urlexpansion'> (<i>ftp://example.com?url=http://example.com</i>)</span> |
| 453 | +<p>And again with mixed protocols: <a href="ftp://example.com?url=http://example.com" class='external' title="ftp://example.com?url=http://example.com" rel="nofollow">link</a><span class='urlexpansion'> (<i>ftp://example.com?url=http://example.com</i>)</span> |
454 | 454 | </p> |
455 | 455 | !!end |
456 | 456 | |
— | — | @@ -458,7 +458,7 @@ |
459 | 459 | !! input |
460 | 460 | URL in text: [http://example.com http://example.com] |
461 | 461 | !! result |
462 | | -<p>URL in text: <a href="http://example.com" class='external'>http://example.com</a> |
| 462 | +<p>URL in text: <a href="http://example.com" class='external' rel="nofollow">http://example.com</a> |
463 | 463 | </p> |
464 | 464 | !! end |
465 | 465 | |
— | — | @@ -467,7 +467,7 @@ |
468 | 468 | !! input |
469 | 469 | ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png] |
470 | 470 | !! result |
471 | | -<p>ja-style clickable images: <a href="http://example.com" class='external' title="http://example.com"><img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" /></a><span class='urlexpansion'> (<i>http://example.com</i>)</span> |
| 471 | +<p>ja-style clickable images: <a href="http://example.com" class='external' title="http://example.com" rel="nofollow"><img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" /></a><span class='urlexpansion'> (<i>http://example.com</i>)</span> |
472 | 472 | </p> |
473 | 473 | !!end |
474 | 474 | |
— | — | @@ -476,7 +476,7 @@ |
477 | 477 | !! input |
478 | 478 | Old & use: http://x&y |
479 | 479 | !! result |
480 | | -<p>Old & use: <a href="http://x&y" class='external'>http://x&y</a> |
| 480 | +<p>Old & use: <a href="http://x&y" class='external' rel="nofollow">http://x&y</a> |
481 | 481 | </p> |
482 | 482 | !! end |
483 | 483 | |
— | — | @@ -485,7 +485,7 @@ |
486 | 486 | !! input |
487 | 487 | http://www.jpeg.org |
488 | 488 | !!result |
489 | | -<p><a href="http://www.jpeg.org" class='external'>http://www.jpeg.org</a> |
| 489 | +<p><a href="http://www.jpeg.org" class='external' rel="nofollow">http://www.jpeg.org</a> |
490 | 490 | </p> |
491 | 491 | !! end |
492 | 492 | |
— | — | @@ -494,7 +494,7 @@ |
495 | 495 | !! input |
496 | 496 | [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp] |
497 | 497 | !! result |
498 | | -<p><a href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp" class='external' title="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a><span class='urlexpansion'> (<i>http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp</i>)</span> |
| 498 | +<p><a href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp" class='external' title="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp" rel="nofollow">[1]</a><span class='urlexpansion'> (<i>http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp</i>)</span> |
499 | 499 | </p> |
500 | 500 | !! end |
501 | 501 | |
— | — | @@ -503,7 +503,7 @@ |
504 | 504 | !! input |
505 | 505 | [http://www.example.com/foo http://www.example.com/bar] |
506 | 506 | !! result |
507 | | -<p><a href="http://www.example.com/foo" class='external' title="http://www.example.com/foo">http://www.example.com/bar</a><span class='urlexpansion'> (<i>http://www.example.com/foo</i>)</span> |
| 507 | +<p><a href="http://www.example.com/foo" class='external' title="http://www.example.com/foo" rel="nofollow">http://www.example.com/bar</a><span class='urlexpansion'> (<i>http://www.example.com/foo</i>)</span> |
508 | 508 | </p> |
509 | 509 | !! end |
510 | 510 | |
— | — | @@ -512,7 +512,7 @@ |
513 | 513 | !! input |
514 | 514 | http://www.example.com/<hello> |
515 | 515 | !! result |
516 | | -<p><a href="http://www.example.com/" class='external'>http://www.example.com/</a><hello> |
| 516 | +<p><a href="http://www.example.com/" class='external' rel="nofollow">http://www.example.com/</a><hello> |
517 | 517 | </p> |
518 | 518 | !!end |
519 | 519 | |
— | — | @@ -521,7 +521,7 @@ |
522 | 522 | !! input |
523 | 523 | http://www.example.com/<b>html</b> |
524 | 524 | !! result |
525 | | -<p><a href="http://www.example.com/" class='external'>http://www.example.com/</a><b >html</b > |
| 525 | +<p><a href="http://www.example.com/" class='external' rel="nofollow">http://www.example.com/</a><b >html</b > |
526 | 526 | </p> |
527 | 527 | !!end |
528 | 528 | |
— | — | @@ -530,7 +530,7 @@ |
531 | 531 | !! input |
532 | 532 | [http://www.example.com/<hello> stuff] |
533 | 533 | !! result |
534 | | -<p><a href="http://www.example.com/" class='external' title="http://www.example.com/"><hello> stuff</a><span class='urlexpansion'> (<i>http://www.example.com/</i>)</span> |
| 534 | +<p><a href="http://www.example.com/" class='external' title="http://www.example.com/" rel="nofollow"><hello> stuff</a><span class='urlexpansion'> (<i>http://www.example.com/</i>)</span> |
535 | 535 | </p> |
536 | 536 | !!end |
537 | 537 | |
— | — | @@ -539,7 +539,7 @@ |
540 | 540 | !! input |
541 | 541 | [http://www.example.com/<b>html</b> stuff] |
542 | 542 | !! result |
543 | | -<p><a href="http://www.example.com/" class='external' title="http://www.example.com/"><b >html</b > stuff</a><span class='urlexpansion'> (<i>http://www.example.com/</i>)</span> |
| 543 | +<p><a href="http://www.example.com/" class='external' title="http://www.example.com/" rel="nofollow"><b >html</b > stuff</a><span class='urlexpansion'> (<i>http://www.example.com/</i>)</span> |
544 | 544 | </p> |
545 | 545 | !!end |
546 | 546 | |
— | — | @@ -548,7 +548,7 @@ |
549 | 549 | !! input |
550 | 550 | http://www.example.com/"hello" |
551 | 551 | !! result |
552 | | -<p><a href="http://www.example.com/" class='external'>http://www.example.com/</a>"hello" |
| 552 | +<p><a href="http://www.example.com/" class='external' rel="nofollow">http://www.example.com/</a>"hello" |
553 | 553 | </p> |
554 | 554 | !!end |
555 | 555 | |
— | — | @@ -557,7 +557,7 @@ |
558 | 558 | !! input |
559 | 559 | [http://www.example.com/"hello" stuff] |
560 | 560 | !! result |
561 | | -<p><a href="http://www.example.com/" class='external' title="http://www.example.com/">"hello" stuff</a><span class='urlexpansion'> (<i>http://www.example.com/</i>)</span> |
| 561 | +<p><a href="http://www.example.com/" class='external' title="http://www.example.com/" rel="nofollow">"hello" stuff</a><span class='urlexpansion'> (<i>http://www.example.com/</i>)</span> |
562 | 562 | </p> |
563 | 563 | !!end |
564 | 564 | |
— | — | @@ -566,7 +566,7 @@ |
567 | 567 | !! input |
568 | 568 | [http://www.example.com test] |
569 | 569 | !! result |
570 | | -<p>[<a href="http://www.example.com" class='external'>http://www.example.com</a> test] |
| 570 | +<p>[<a href="http://www.example.com" class='external' rel="nofollow">http://www.example.com</a> test] |
571 | 571 | </p> |
572 | 572 | !! end |
573 | 573 | |
— | — | @@ -887,7 +887,7 @@ |
888 | 888 | !! input |
889 | 889 | [[http://www.example.org]] |
890 | 890 | !! result |
891 | | -<p>[<a href="http://www.example.org" class='external' title="http://www.example.org">[1]</a><span class='urlexpansion'> (<i>http://www.example.org</i>)</span>] |
| 891 | +<p>[<a href="http://www.example.org" class='external' title="http://www.example.org" rel="nofollow">[1]</a><span class='urlexpansion'> (<i>http://www.example.org</i>)</span>] |
892 | 892 | </p> |
893 | 893 | !! end |
894 | 894 | |
— | — | @@ -907,7 +907,7 @@ |
908 | 908 | !! input |
909 | 909 | Piped link to URL: [[http://www.example.org|an example URL]] |
910 | 910 | !! result |
911 | | -<p>Piped link to URL: [<a href="http://www.example.org|an" class='external' title="http://www.example.org|an">example URL</a><span class='urlexpansion'> (<i>http://www.example.org|an</i>)</span>] |
| 911 | +<p>Piped link to URL: [<a href="http://www.example.org|an" class='external' title="http://www.example.org|an" rel="nofollow">example URL</a><span class='urlexpansion'> (<i>http://www.example.org|an</i>)</span>] |
912 | 912 | </p> |
913 | 913 | !! end |
914 | 914 | |
— | — | @@ -1488,7 +1488,7 @@ |
1489 | 1489 | !! input |
1490 | 1490 | [[Image:foobar.jpg|thumb|http://example.com]] |
1491 | 1491 | !! result |
1492 | | -<div class="thumb tright"><div style="width:182px;"><a href="https://www.mediawiki.org/wiki/Image:Foobar.jpg" class="internal" title="http://example.com"><img src="/images/3/3a/Foobar.jpg" alt="http://example.com" width="180" height="180" longdesc="/wiki/Image:Foobar.jpg" /></a> <div class="thumbcaption" ><div class="magnify" style="float:right"><a href="https://www.mediawiki.org/wiki/Image:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="Enlarge" /></a></div><a href="http://example.com" class='external'>http://example.com</a></div></div></div> |
| 1492 | +<div class="thumb tright"><div style="width:182px;"><a href="https://www.mediawiki.org/wiki/Image:Foobar.jpg" class="internal" title="http://example.com"><img src="/images/3/3a/Foobar.jpg" alt="http://example.com" width="180" height="180" longdesc="/wiki/Image:Foobar.jpg" /></a> <div class="thumbcaption" ><div class="magnify" style="float:right"><a href="https://www.mediawiki.org/wiki/Image:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="Enlarge" /></a></div><a href="http://example.com" class='external' rel="nofollow">http://example.com</a></div></div></div> |
1493 | 1493 | |
1494 | 1494 | !! end |
1495 | 1495 | |
— | — | @@ -1773,7 +1773,7 @@ |
1774 | 1774 | !! input |
1775 | 1775 | http://example.com [[Image:foobar.jpg]] |
1776 | 1776 | !! result |
1777 | | -<p><a href="http://example.com" class='external'>http://example.com</a> <a href="https://www.mediawiki.org/wiki/Image:Foobar.jpg" class="image" title="Image:foobar.jpg"><img src="/images/3/3a/Foobar.jpg" alt="Image:foobar.jpg" longdesc="/wiki/Image:Foobar.jpg" /></a> |
| 1777 | +<p><a href="http://example.com" class='external' rel="nofollow">http://example.com</a> <a href="https://www.mediawiki.org/wiki/Image:Foobar.jpg" class="image" title="Image:foobar.jpg"><img src="/images/3/3a/Foobar.jpg" alt="Image:foobar.jpg" longdesc="/wiki/Image:Foobar.jpg" /></a> |
1778 | 1778 | </p> |
1779 | 1779 | !!end |
1780 | 1780 | |
— | — | @@ -1782,7 +1782,7 @@ |
1783 | 1783 | !! input |
1784 | 1784 | http://example.com[[Image:foobar.jpg]] |
1785 | 1785 | !! result |
1786 | | -<p><a href="http://example.com" class='external'>http://example.com</a><a href="https://www.mediawiki.org/wiki/Image:Foobar.jpg" class="image" title="Image:foobar.jpg"><img src="/images/3/3a/Foobar.jpg" alt="Image:foobar.jpg" longdesc="/wiki/Image:Foobar.jpg" /></a> |
| 1786 | +<p><a href="http://example.com" class='external' rel="nofollow">http://example.com</a><a href="https://www.mediawiki.org/wiki/Image:Foobar.jpg" class="image" title="Image:foobar.jpg"><img src="/images/3/3a/Foobar.jpg" alt="Image:foobar.jpg" longdesc="/wiki/Image:Foobar.jpg" /></a> |
1787 | 1787 | </p> |
1788 | 1788 | !!end |
1789 | 1789 | |
— | — | @@ -1791,7 +1791,7 @@ |
1792 | 1792 | !! input |
1793 | 1793 | http://en.wikinews.org/wiki/Wikinews:Workplace |
1794 | 1794 | !! result |
1795 | | -<p><a href="http://en.wikinews.org/wiki/Wikinews:Workplace" class='external'>http://en.wikinews.org/wiki/Wikinews:Workplace</a> |
| 1795 | +<p><a href="http://en.wikinews.org/wiki/Wikinews:Workplace" class='external' rel="nofollow">http://en.wikinews.org/wiki/Wikinews:Workplace</a> |
1796 | 1796 | </p> |
1797 | 1797 | !!end |
1798 | 1798 | |
Index: branches/REL1_4/phase3/maintenance/parserTests.php |
— | — | @@ -298,6 +298,7 @@ |
299 | 299 | 'wgNamespacesWithSubpages' => array( 0 => preg_match('/\\bsubpage\\b/i', $opts)), |
300 | 300 | 'wgMaxTocLevel' => 999, |
301 | 301 | 'wgCapitalLinks' => true, |
| 302 | + 'wgNoFollowLinks' => true, |
302 | 303 | ); |
303 | 304 | $this->savedGlobals = array(); |
304 | 305 | foreach( $settings as $var => $val ) { |
Index: branches/REL1_4/phase3/includes/DefaultSettings.php |
— | — | @@ -929,6 +929,14 @@ |
930 | 930 | */ |
931 | 931 | $wgSearchForwardUrl = null; |
932 | 932 | |
| 933 | +/** |
| 934 | + * If true, external URL links in wiki text will be given the |
| 935 | + * rel="nofollow" attribute as a hint to search engines that |
| 936 | + * they should not be followed for ranking purposes as they |
| 937 | + * are user-supplied and thus subject to spamming. |
| 938 | + */ |
| 939 | +$wgNoFollowLinks = true; |
| 940 | + |
933 | 941 | } else { |
934 | 942 | die(); |
935 | 943 | } |
Index: branches/REL1_4/phase3/includes/Skin.php |
— | — | @@ -1944,6 +1944,10 @@ |
1945 | 1945 | |
1946 | 1946 | function makeExternalLink( $url, $text, $escape = true ) { |
1947 | 1947 | $style = $this->getExternalLinkAttributes( $url, $text ); |
| 1948 | + global $wgNoFollowLinks; |
| 1949 | + if( $wgNoFollowLinks ) { |
| 1950 | + $style .= ' rel="nofollow"'; |
| 1951 | + } |
1948 | 1952 | $url = htmlspecialchars( $url ); |
1949 | 1953 | if( $escape ) { |
1950 | 1954 | $text = htmlspecialchars( $text ); |
Index: branches/REL1_4/phase3/RELEASE-NOTES |
— | — | @@ -256,6 +256,8 @@ |
257 | 257 | * Remove unnecessary initialization and double-caching of parser variables |
258 | 258 | * Call-tree output mode for profiling |
259 | 259 | * (bug 730) configurable $wgRCMaxAge; don't try to update purged RC entries |
| 260 | +* Add $wgNoFollowLinks option to add rel="nofollow" on external links |
| 261 | + (on by default) |
260 | 262 | |
261 | 263 | === Caveats === |
262 | 264 | |