Index: trunk/phase3/tests/parser/extraParserTests.txt |
— | — | @@ -12,7 +12,7 @@ |
13 | 13 | !! input |
14 | 14 | [http://www.example.com test] |
15 | 15 | !! result |
16 | | -<p>[<a href="http://www.example.com" class="external free" rel="nofollow">http://www.example.com</a> test] |
| 16 | +<p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a> test] |
17 | 17 | </p> |
18 | 18 | !! end |
19 | 19 | |
— | — | @@ -24,7 +24,7 @@ |
25 | 25 | !! input |
26 | 26 | [http://www.example.com test] |
27 | 27 | !! result |
28 | | -<p>[<a href="http://www.example.com" class="external free" rel="nofollow">http://www.example.com</a> test] |
| 28 | +<p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a> test] |
29 | 29 | </p> |
30 | 30 | !! end |
31 | 31 | |
— | — | @@ -37,7 +37,7 @@ |
38 | 38 | !! input |
39 | 39 | http://www.example.com |
40 | 40 | !! result |
41 | | -<p><a href="http://www.example.com" class="external free" rel="nofollow">http://www.example.com</a> |
| 41 | +<p><a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a> |
42 | 42 | </p> |
43 | 43 | !! end |
44 | 44 | |
— | — | @@ -46,6 +46,6 @@ |
47 | 47 | !! input |
48 | 48 | [http://www.example.com Alice in Wonderland] |
49 | 49 | !! result |
50 | | -<p><a href="http://www.example.com" class="external text" rel="nofollow">Alice in Wonderland</a> |
| 50 | +<p><a rel="nofollow" class="external text" href="http://www.example.com">Alice in Wonderland</a> |
51 | 51 | </p> |
52 | 52 | !! end |
Index: trunk/phase3/tests/parser/parserTests.txt |
— | — | @@ -518,7 +518,7 @@ |
519 | 519 | !! input |
520 | 520 | ; http://example.com/ : definition |
521 | 521 | !! result |
522 | | -<dl><dt> <a href="http://example.com/" class="external free" rel="nofollow">http://example.com/</a> </dt><dd> definition |
| 522 | +<dl><dt> <a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt><dd> definition |
523 | 523 | </dd></dl> |
524 | 524 | |
525 | 525 | !! end |
— | — | @@ -528,7 +528,7 @@ |
529 | 529 | !! input |
530 | 530 | ;[http://www.example.com/ Example]:Something about it |
531 | 531 | !! result |
532 | | -<dl><dt><a href="http://www.example.com/" class="external text" rel="nofollow">Example</a></dt><dd>Something about it |
| 532 | +<dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt><dd>Something about it |
533 | 533 | </dd></dl> |
534 | 534 | |
535 | 535 | !! end |
— | — | @@ -549,7 +549,7 @@ |
550 | 550 | !! input |
551 | 551 | ; news:alt.wikipedia.rox: This isn't even a real newsgroup! |
552 | 552 | !! result |
553 | | -<dl><dt> <a href="news:alt.wikipedia.rox" class="external free" rel="nofollow">news:alt.wikipedia.rox</a></dt><dd> This isn't even a real newsgroup! |
| 553 | +<dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt><dd> This isn't even a real newsgroup! |
554 | 554 | </dd></dl> |
555 | 555 | |
556 | 556 | !! end |
— | — | @@ -559,7 +559,7 @@ |
560 | 560 | !! input |
561 | 561 | ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop |
562 | 562 | !! result |
563 | | -<dl><dt> <a href="news:alt.wikipedia.rox" class="external free" rel="nofollow">news:alt.wikipedia.rox</a> -- don't crash or enter an infinite loop |
| 563 | +<dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a> -- don't crash or enter an infinite loop |
564 | 564 | </dt></dl> |
565 | 565 | |
566 | 566 | !! end |
— | — | @@ -569,7 +569,7 @@ |
570 | 570 | !! input |
571 | 571 | ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up |
572 | 572 | !! result |
573 | | -<dl><dt> <a href="http://www.wikipedia2.org/" class="external text" rel="nofollow">Wikipedia : The Next Generation</a></dt><dd> OK, I made that up |
| 573 | +<dl><dt> <a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia : The Next Generation</a></dt><dd> OK, I made that up |
574 | 574 | </dd></dl> |
575 | 575 | |
576 | 576 | !! end |
— | — | @@ -623,7 +623,7 @@ |
624 | 624 | !! input |
625 | 625 | Non-bracketed: http://example.com |
626 | 626 | !! result |
627 | | -<p>Non-bracketed: <a href="http://example.com" class="external free" rel="nofollow">http://example.com</a> |
| 627 | +<p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> |
628 | 628 | </p> |
629 | 629 | !! end |
630 | 630 | |
— | — | @@ -634,9 +634,9 @@ |
635 | 635 | Numbered: [http://example.net] |
636 | 636 | Numbered: [http://example.com] |
637 | 637 | !! result |
638 | | -<p>Numbered: <a href="http://example.com" class="external autonumber" rel="nofollow">[1]</a> |
639 | | -Numbered: <a href="http://example.net" class="external autonumber" rel="nofollow">[2]</a> |
640 | | -Numbered: <a href="http://example.com" class="external autonumber" rel="nofollow">[3]</a> |
| 638 | +<p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a> |
| 639 | +Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a> |
| 640 | +Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a> |
641 | 641 | </p> |
642 | 642 | !!end |
643 | 643 | |
— | — | @@ -645,7 +645,7 @@ |
646 | 646 | !! input |
647 | 647 | Specified text: [http://example.com link] |
648 | 648 | !! result |
649 | | -<p>Specified text: <a href="http://example.com" class="external text" rel="nofollow">link</a> |
| 649 | +<p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a> |
650 | 650 | </p> |
651 | 651 | !!end |
652 | 652 | |
— | — | @@ -654,7 +654,7 @@ |
655 | 655 | !! input |
656 | 656 | Linktrails should not work for external links: [http://example.com link]s |
657 | 657 | !! result |
658 | | -<p>Linktrails should not work for external links: <a href="http://example.com" class="external text" rel="nofollow">link</a>s |
| 658 | +<p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s |
659 | 659 | </p> |
660 | 660 | !! end |
661 | 661 | |
— | — | @@ -663,7 +663,7 @@ |
664 | 664 | !! input |
665 | 665 | http://example.com/1$2345 |
666 | 666 | !! result |
667 | | -<p><a href="http://example.com/1$2345" class="external free" rel="nofollow">http://example.com/1$2345</a> |
| 667 | +<p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a> |
668 | 668 | </p> |
669 | 669 | !! end |
670 | 670 | |
— | — | @@ -672,7 +672,7 @@ |
673 | 673 | !! input |
674 | 674 | [http://example.com/1$2345] |
675 | 675 | !! result |
676 | | -<p><a href="http://example.com/1$2345" class="external autonumber" rel="nofollow">[1]</a> |
| 676 | +<p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a> |
677 | 677 | </p> |
678 | 678 | !!end |
679 | 679 | |
— | — | @@ -681,7 +681,7 @@ |
682 | 682 | !! input |
683 | 683 | http://example.com/1[2345 |
684 | 684 | !! result |
685 | | -<p><a href="http://example.com/1" class="external free" rel="nofollow">http://example.com/1</a>[2345 |
| 685 | +<p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345 |
686 | 686 | </p> |
687 | 687 | !! end |
688 | 688 | |
— | — | @@ -690,7 +690,7 @@ |
691 | 691 | !! input |
692 | 692 | [http://example.com/1[2345] |
693 | 693 | !! result |
694 | | -<p><a href="http://example.com/1" class="external text" rel="nofollow">[2345</a> |
| 694 | +<p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a> |
695 | 695 | </p> |
696 | 696 | !!end |
697 | 697 | |
— | — | @@ -699,7 +699,7 @@ |
700 | 700 | !!input |
701 | 701 | [http://example.com/ <nowiki>''example site''</nowiki>] |
702 | 702 | !! result |
703 | | -<p><a href="http://example.com/" class="external text" rel="nofollow">''example site''</a> |
| 703 | +<p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a> |
704 | 704 | </p> |
705 | 705 | !! end |
706 | 706 | |
— | — | @@ -709,7 +709,7 @@ |
710 | 710 | [http://example.com/ first |
711 | 711 | second] |
712 | 712 | !! result |
713 | | -<p>[<a href="http://example.com/" class="external free" rel="nofollow">http://example.com/</a> first |
| 713 | +<p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first |
714 | 714 | second] |
715 | 715 | </p> |
716 | 716 | !!end |
— | — | @@ -737,7 +737,7 @@ |
738 | 738 | !! input |
739 | 739 | Link to non-http image, no img tag: ftp://example.com/test.jpg |
740 | 740 | !! result |
741 | | -<p>Link to non-http image, no img tag: <a href="ftp://example.com/test.jpg" class="external free" rel="nofollow">ftp://example.com/test.jpg</a> |
| 741 | +<p>Link to non-http image, no img tag: <a rel="nofollow" class="external free" href="ftp://example.com/test.jpg">ftp://example.com/test.jpg</a> |
742 | 742 | </p> |
743 | 743 | !! end |
744 | 744 | |
— | — | @@ -746,7 +746,7 @@ |
747 | 747 | !! input |
748 | 748 | Terminating separator: http://example.com/thing, |
749 | 749 | !! result |
750 | | -<p>Terminating separator: <a href="http://example.com/thing" class="external free" rel="nofollow">http://example.com/thing</a>, |
| 750 | +<p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>, |
751 | 751 | </p> |
752 | 752 | !! end |
753 | 753 | |
— | — | @@ -755,7 +755,7 @@ |
756 | 756 | !! input |
757 | 757 | Intervening separator: http://example.com/1,2,3 |
758 | 758 | !! result |
759 | | -<p>Intervening separator: <a href="http://example.com/1,2,3" class="external free" rel="nofollow">http://example.com/1,2,3</a> |
| 759 | +<p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a> |
760 | 760 | </p> |
761 | 761 | !! end |
762 | 762 | |
— | — | @@ -764,7 +764,7 @@ |
765 | 765 | !! input |
766 | 766 | Old bug with URL in query: [http://example.com/thing?url=http://example.com link] |
767 | 767 | !! result |
768 | | -<p>Old bug with URL in query: <a href="http://example.com/thing?url=http://example.com" class="external text" rel="nofollow">link</a> |
| 768 | +<p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a> |
769 | 769 | </p> |
770 | 770 | !! end |
771 | 771 | |
— | — | @@ -773,7 +773,7 @@ |
774 | 774 | !! input |
775 | 775 | And again with mixed protocols: [ftp://example.com?url=http://example.com link] |
776 | 776 | !! result |
777 | | -<p>And again with mixed protocols: <a href="ftp://example.com?url=http://example.com" class="external text" rel="nofollow">link</a> |
| 777 | +<p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a> |
778 | 778 | </p> |
779 | 779 | !!end |
780 | 780 | |
— | — | @@ -782,7 +782,7 @@ |
783 | 783 | !! input |
784 | 784 | URL in text: [http://example.com http://example.com] |
785 | 785 | !! result |
786 | | -<p>URL in text: <a href="http://example.com" class="external free" rel="nofollow">http://example.com</a> |
| 786 | +<p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> |
787 | 787 | </p> |
788 | 788 | !! end |
789 | 789 | |
— | — | @@ -791,7 +791,7 @@ |
792 | 792 | !! input |
793 | 793 | ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png] |
794 | 794 | !! result |
795 | | -<p>ja-style clickable images: <a href="http://example.com" class="external text" rel="nofollow"><img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" /></a> |
| 795 | +<p>ja-style clickable images: <a rel="nofollow" class="external text" href="http://example.com"><img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" /></a> |
796 | 796 | </p> |
797 | 797 | !!end |
798 | 798 | |
— | — | @@ -800,7 +800,7 @@ |
801 | 801 | !! input |
802 | 802 | Old & use: http://x&y |
803 | 803 | !! result |
804 | | -<p>Old & use: <a href="http://x&y" class="external free" rel="nofollow">http://x&y</a> |
| 804 | +<p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a> |
805 | 805 | </p> |
806 | 806 | !! end |
807 | 807 | |
— | — | @@ -809,7 +809,7 @@ |
810 | 810 | !! input |
811 | 811 | Old & use: http://x&y |
812 | 812 | !! result |
813 | | -<p>Old & use: <a href="http://x&y" class="external free" rel="nofollow">http://x&y</a> |
| 813 | +<p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a> |
814 | 814 | </p> |
815 | 815 | !! end |
816 | 816 | |
— | — | @@ -818,7 +818,7 @@ |
819 | 819 | !! input |
820 | 820 | http://example.com/?foo=bar |
821 | 821 | !! result |
822 | | -<p><a href="http://example.com/?foo=bar" class="external free" rel="nofollow">http://example.com/?foo=bar</a> |
| 822 | +<p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a> |
823 | 823 | </p> |
824 | 824 | !! end |
825 | 825 | |
— | — | @@ -827,7 +827,7 @@ |
828 | 828 | !! input |
829 | 829 | Old & use: [http://x&y] |
830 | 830 | !! result |
831 | | -<p>Old & use: <a href="http://x&y" class="external autonumber" rel="nofollow">[1]</a> |
| 831 | +<p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a> |
832 | 832 | </p> |
833 | 833 | !! end |
834 | 834 | |
— | — | @@ -836,7 +836,7 @@ |
837 | 837 | !! input |
838 | 838 | Old & use: [http://x&y] |
839 | 839 | !! result |
840 | | -<p>Old & use: <a href="http://x&y" class="external autonumber" rel="nofollow">[1]</a> |
| 840 | +<p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a> |
841 | 841 | </p> |
842 | 842 | !! end |
843 | 843 | |
— | — | @@ -845,7 +845,7 @@ |
846 | 846 | !! input |
847 | 847 | [http://example.com/?foo=bar] |
848 | 848 | !! result |
849 | | -<p><a href="http://example.com/?foo=bar" class="external autonumber" rel="nofollow">[1]</a> |
| 849 | +<p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a> |
850 | 850 | </p> |
851 | 851 | !! end |
852 | 852 | |
— | — | @@ -854,7 +854,7 @@ |
855 | 855 | !! input |
856 | 856 | [http://e‌xample.com/] |
857 | 857 | !! result |
858 | | -<p><a href="http://example.com/" class="external autonumber" rel="nofollow">[1]</a> |
| 858 | +<p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a> |
859 | 859 | </p> |
860 | 860 | !! end |
861 | 861 | |
— | — | @@ -863,7 +863,7 @@ |
864 | 864 | !! input |
865 | 865 | http://e‌xample.com/ |
866 | 866 | !! result |
867 | | -<p><a href="http://example.com/" class="external free" rel="nofollow">http://example.com/</a> |
| 867 | +<p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> |
868 | 868 | </p> |
869 | 869 | !! end |
870 | 870 | |
— | — | @@ -872,7 +872,7 @@ |
873 | 873 | !! input |
874 | 874 | http://www.jpeg.org |
875 | 875 | !!result |
876 | | -<p><a href="http://www.jpeg.org" class="external free" rel="nofollow">http://www.jpeg.org</a> |
| 876 | +<p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a> |
877 | 877 | </p> |
878 | 878 | !! end |
879 | 879 | |
— | — | @@ -881,7 +881,7 @@ |
882 | 882 | !! input |
883 | 883 | [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp] |
884 | 884 | !! result |
885 | | -<p><a href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp" class="external autonumber" rel="nofollow">[1]</a> |
| 885 | +<p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a> |
886 | 886 | </p> |
887 | 887 | !! end |
888 | 888 | |
— | — | @@ -890,7 +890,7 @@ |
891 | 891 | !! input |
892 | 892 | [http://www.example.com/foo http://www.example.com/bar] |
893 | 893 | !! result |
894 | | -<p><a href="http://www.example.com/foo" class="external text" rel="nofollow">http://www.example.com/bar</a> |
| 894 | +<p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a> |
895 | 895 | </p> |
896 | 896 | !! end |
897 | 897 | |
— | — | @@ -899,7 +899,7 @@ |
900 | 900 | !! input |
901 | 901 | http://www.example.com/foo?=http://www.example.com/bar |
902 | 902 | !! result |
903 | | -<p><a href="http://www.example.com/foo?=http://www.example.com/bar" class="external free" rel="nofollow">http://www.example.com/foo?=http://www.example.com/bar</a> |
| 903 | +<p><a rel="nofollow" class="external free" href="http://www.example.com/foo?=http://www.example.com/bar">http://www.example.com/foo?=http://www.example.com/bar</a> |
904 | 904 | </p> |
905 | 905 | !! end |
906 | 906 | |
— | — | @@ -908,7 +908,7 @@ |
909 | 909 | !! input |
910 | 910 | http://www.example.com/<hello> |
911 | 911 | !! result |
912 | | -<p><a href="http://www.example.com/" class="external free" rel="nofollow">http://www.example.com/</a><hello> |
| 912 | +<p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello> |
913 | 913 | </p> |
914 | 914 | !!end |
915 | 915 | |
— | — | @@ -917,7 +917,7 @@ |
918 | 918 | !! input |
919 | 919 | http://www.example.com/<b>html</b> |
920 | 920 | !! result |
921 | | -<p><a href="http://www.example.com/" class="external free" rel="nofollow">http://www.example.com/</a><b>html</b> |
| 921 | +<p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b> |
922 | 922 | </p> |
923 | 923 | !!end |
924 | 924 | |
— | — | @@ -926,7 +926,7 @@ |
927 | 927 | !! input |
928 | 928 | [http://www.example.com/<hello> stuff] |
929 | 929 | !! result |
930 | | -<p><a href="http://www.example.com/" class="external text" rel="nofollow"><hello> stuff</a> |
| 930 | +<p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a> |
931 | 931 | </p> |
932 | 932 | !!end |
933 | 933 | |
— | — | @@ -935,7 +935,7 @@ |
936 | 936 | !! input |
937 | 937 | [http://www.example.com/<b>html</b> stuff] |
938 | 938 | !! result |
939 | | -<p><a href="http://www.example.com/" class="external text" rel="nofollow"><b>html</b> stuff</a> |
| 939 | +<p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a> |
940 | 940 | </p> |
941 | 941 | !!end |
942 | 942 | |
— | — | @@ -944,7 +944,7 @@ |
945 | 945 | !! input |
946 | 946 | http://www.example.com/"hello" |
947 | 947 | !! result |
948 | | -<p><a href="http://www.example.com/" class="external free" rel="nofollow">http://www.example.com/</a>"hello" |
| 948 | +<p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello" |
949 | 949 | </p> |
950 | 950 | !!end |
951 | 951 | |
— | — | @@ -953,7 +953,7 @@ |
954 | 954 | !! input |
955 | 955 | [http://www.example.com/"hello" stuff] |
956 | 956 | !! result |
957 | | -<p><a href="http://www.example.com/" class="external text" rel="nofollow">"hello" stuff</a> |
| 957 | +<p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a> |
958 | 958 | </p> |
959 | 959 | !!end |
960 | 960 | |
— | — | @@ -962,7 +962,7 @@ |
963 | 963 | !! input |
964 | 964 | [http://www.example.com test] |
965 | 965 | !! result |
966 | | -<p><a href="http://www.example.com" class="external text" rel="nofollow">test</a> |
| 966 | +<p><a rel="nofollow" class="external text" href="http://www.example.com">test</a> |
967 | 967 | </p> |
968 | 968 | !! end |
969 | 969 | |
— | — | @@ -971,7 +971,7 @@ |
972 | 972 | !! input |
973 | 973 | [http://example.com [[wikilink]] embedded in ext link] |
974 | 974 | !! result |
975 | | -<p><a href="http://example.com" class="external text" rel="nofollow"></a><a href="https://www.mediawiki.org/index.php?title=Wikilink&action=edit&redlink=1" class="new" title="Wikilink (page does not exist)">wikilink</a><a href="http://example.com" class="external text" rel="nofollow"> embedded in ext link</a> |
| 975 | +<p><a rel="nofollow" class="external text" href="http://example.com"></a><a href="https://www.mediawiki.org/index.php?title=Wikilink&action=edit&redlink=1" class="new" title="Wikilink (page does not exist)">wikilink</a><a rel="nofollow" class="external text" href="http://example.com"> embedded in ext link</a> |
976 | 976 | </p> |
977 | 977 | !! end |
978 | 978 | |
— | — | @@ -996,11 +996,11 @@ |
997 | 997 | ''Something [http://example.com mixed''''', even bold]''' |
998 | 998 | '''''Now [http://example.com both'''''] |
999 | 999 | !! result |
1000 | | -<p><a href="http://example.com" class="external text" rel="nofollow"><i>text</i></a> |
1001 | | -<a href="http://example.com" class="external text" rel="nofollow"><b>text</b></a> |
1002 | | -<i>Something </i><a href="http://example.com" class="external text" rel="nofollow"><i>in italic</i></a> |
1003 | | -<i>Something </i><a href="http://example.com" class="external text" rel="nofollow"><i>mixed</i><b>, even bold</b></a> |
1004 | | -<i><b>Now </b></i><a href="http://example.com" class="external text" rel="nofollow"><i><b>both</b></i></a> |
| 1000 | +<p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a> |
| 1001 | +<a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a> |
| 1002 | +<i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a> |
| 1003 | +<i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a> |
| 1004 | +<i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a> |
1005 | 1005 | </p> |
1006 | 1006 | !! end |
1007 | 1007 | |
— | — | @@ -1010,7 +1010,7 @@ |
1011 | 1011 | !! input |
1012 | 1012 | http://www.example.com/?title=AT%26T |
1013 | 1013 | !! result |
1014 | | -<p><a href="http://www.example.com/?title=AT%26T" class="external free" rel="nofollow">http://www.example.com/?title=AT%26T</a> |
| 1014 | +<p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a> |
1015 | 1015 | </p> |
1016 | 1016 | !! end |
1017 | 1017 | |
— | — | @@ -1019,7 +1019,7 @@ |
1020 | 1020 | !! input |
1021 | 1021 | http://www.example.com/?title=100%25_Bran |
1022 | 1022 | !! result |
1023 | | -<p><a href="http://www.example.com/?title=100%25_Bran" class="external free" rel="nofollow">http://www.example.com/?title=100%25_Bran</a> |
| 1023 | +<p><a rel="nofollow" class="external free" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a> |
1024 | 1024 | </p> |
1025 | 1025 | !! end |
1026 | 1026 | |
— | — | @@ -1028,7 +1028,7 @@ |
1029 | 1029 | !! input |
1030 | 1030 | http://www.example.com/?title=Ben-Hur_%281959_film%29 |
1031 | 1031 | !! result |
1032 | | -<p><a href="http://www.example.com/?title=Ben-Hur_%281959_film%29" class="external free" rel="nofollow">http://www.example.com/?title=Ben-Hur_%281959_film%29</a> |
| 1032 | +<p><a rel="nofollow" class="external free" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">http://www.example.com/?title=Ben-Hur_%281959_film%29</a> |
1033 | 1033 | </p> |
1034 | 1034 | !! end |
1035 | 1035 | |
— | — | @@ -1038,7 +1038,7 @@ |
1039 | 1039 | !! input |
1040 | 1040 | [http://www.example.com/?title=AT%26T] |
1041 | 1041 | !! result |
1042 | | -<p><a href="http://www.example.com/?title=AT%26T" class="external autonumber" rel="nofollow">[1]</a> |
| 1042 | +<p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a> |
1043 | 1043 | </p> |
1044 | 1044 | !! end |
1045 | 1045 | |
— | — | @@ -1047,7 +1047,7 @@ |
1048 | 1048 | !! input |
1049 | 1049 | [http://www.example.com/?title=100%25_Bran] |
1050 | 1050 | !! result |
1051 | | -<p><a href="http://www.example.com/?title=100%25_Bran" class="external autonumber" rel="nofollow">[1]</a> |
| 1051 | +<p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a> |
1052 | 1052 | </p> |
1053 | 1053 | !! end |
1054 | 1054 | |
— | — | @@ -1056,7 +1056,7 @@ |
1057 | 1057 | !! input |
1058 | 1058 | [http://www.example.com/?title=Ben-Hur_%281959_film%29] |
1059 | 1059 | !! result |
1060 | | -<p><a href="http://www.example.com/?title=Ben-Hur_%281959_film%29" class="external autonumber" rel="nofollow">[1]</a> |
| 1060 | +<p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a> |
1061 | 1061 | </p> |
1062 | 1062 | !! end |
1063 | 1063 | |
— | — | @@ -1066,7 +1066,7 @@ |
1067 | 1067 | !! input |
1068 | 1068 | [http://www.example.com/?title=AT%26T link] |
1069 | 1069 | !! result |
1070 | | -<p><a href="http://www.example.com/?title=AT%26T" class="external text" rel="nofollow">link</a> |
| 1070 | +<p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a> |
1071 | 1071 | </p> |
1072 | 1072 | !! end |
1073 | 1073 | |
— | — | @@ -1075,7 +1075,7 @@ |
1076 | 1076 | !! input |
1077 | 1077 | [http://www.example.com/?title=100%25_Bran link] |
1078 | 1078 | !! result |
1079 | | -<p><a href="http://www.example.com/?title=100%25_Bran" class="external text" rel="nofollow">link</a> |
| 1079 | +<p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a> |
1080 | 1080 | </p> |
1081 | 1081 | !! end |
1082 | 1082 | |
— | — | @@ -1084,7 +1084,7 @@ |
1085 | 1085 | !! input |
1086 | 1086 | [http://www.example.com/?title=Ben-Hur_%281959_film%29 link] |
1087 | 1087 | !! result |
1088 | | -<p><a href="http://www.example.com/?title=Ben-Hur_%281959_film%29" class="external text" rel="nofollow">link</a> |
| 1088 | +<p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a> |
1089 | 1089 | </p> |
1090 | 1090 | !! end |
1091 | 1091 | |
— | — | @@ -1093,7 +1093,7 @@ |
1094 | 1094 | !! input |
1095 | 1095 | Some [http://example.com/ pretty ''italics'' and stuff]! |
1096 | 1096 | !! result |
1097 | | -<p>Some <a href="http://example.com/" class="external text" rel="nofollow">pretty <i>italics</i> and stuff</a>! |
| 1097 | +<p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>! |
1098 | 1098 | </p> |
1099 | 1099 | !! end |
1100 | 1100 | |
— | — | @@ -1102,7 +1102,7 @@ |
1103 | 1103 | !! input |
1104 | 1104 | ''Some [http://example.com/ pretty ''italics'' and stuff]!'' |
1105 | 1105 | !! result |
1106 | | -<p><i>Some </i><a href="http://example.com/" class="external text" rel="nofollow"><i>pretty </i>italics<i> and stuff</i></a><i>!</i> |
| 1106 | +<p><i>Some </i><a rel="nofollow" class="external text" href="http://example.com/"><i>pretty </i>italics<i> and stuff</i></a><i>!</i> |
1107 | 1107 | </p> |
1108 | 1108 | !! end |
1109 | 1109 | |
— | — | @@ -1111,7 +1111,7 @@ |
1112 | 1112 | !! input |
1113 | 1113 | [http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm''La muerte de Casagemas'' (1901) en el sitio de [[Museo Picasso (París)|Museo Picasso]].] |
1114 | 1114 | !! result |
1115 | | -<p><a href="http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm" class="external text" rel="nofollow"><i>La muerte de Casagemas</i> (1901) en el sitio de <a href="https://www.mediawiki.org/index.php?title=Museo_Picasso_(Par%C3%ADs)&action=edit&redlink=1" class="new" title="Museo Picasso (París) (page does not exist)">Museo Picasso</a>.</a> |
| 1115 | +<p><a rel="nofollow" class="external text" href="http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm"><i>La muerte de Casagemas</i> (1901) en el sitio de <a href="https://www.mediawiki.org/index.php?title=Museo_Picasso_(Par%C3%ADs)&action=edit&redlink=1" class="new" title="Museo Picasso (París) (page does not exist)">Museo Picasso</a>.</a> |
1116 | 1116 | </p> |
1117 | 1117 | !! end |
1118 | 1118 | |
— | — | @@ -1390,7 +1390,7 @@ |
1391 | 1391 | !! result |
1392 | 1392 | <table> |
1393 | 1393 | <tr> |
1394 | | -<td>[<a href="ftp://%7Cx" class="external free" rel="nofollow">ftp://%7Cx</a></td> |
| 1394 | +<td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td> |
1395 | 1395 | <td>]" onmouseover="alert(document.cookie)">test |
1396 | 1396 | </td> |
1397 | 1397 | </tr> |
— | — | @@ -1633,7 +1633,7 @@ |
1634 | 1634 | !! input |
1635 | 1635 | [[http://www.example.com]] |
1636 | 1636 | !! result |
1637 | | -<p>[<a href="http://www.example.com" class="external autonumber" rel="nofollow">[1]</a>] |
| 1637 | +<p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>] |
1638 | 1638 | </p> |
1639 | 1639 | !! end |
1640 | 1640 | |
— | — | @@ -1653,7 +1653,7 @@ |
1654 | 1654 | !! input |
1655 | 1655 | Piped link to URL: [[http://www.example.com|an example URL]] |
1656 | 1656 | !! result |
1657 | | -<p>Piped link to URL: [<a href="http://www.example.com%7Can" class="external text" rel="nofollow">example URL</a>] |
| 1657 | +<p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>] |
1658 | 1658 | </p> |
1659 | 1659 | !! end |
1660 | 1660 | |
— | — | @@ -2195,7 +2195,7 @@ |
2196 | 2196 | !! input |
2197 | 2197 | {{SERVER}} |
2198 | 2198 | !! result |
2199 | | -<p><a href="http://Britney-Spears" class="external free" rel="nofollow">http://Britney-Spears</a> |
| 2199 | +<p><a rel="nofollow" class="external free" href="http://Britney-Spears">http://Britney-Spears</a> |
2200 | 2200 | </p> |
2201 | 2201 | !! end |
2202 | 2202 | |
— | — | @@ -2360,7 +2360,7 @@ |
2361 | 2361 | !! input |
2362 | 2362 | RFC 822 |
2363 | 2363 | !! result |
2364 | | -<p><a href="http://tools.ietf.org/html/rfc822" class="external mw-magiclink-rfc">RFC 822</a> |
| 2364 | +<p><a class="external mw-magiclink-rfc" href="http://tools.ietf.org/html/rfc822">RFC 822</a> |
2365 | 2365 | </p> |
2366 | 2366 | !! end |
2367 | 2367 | |
— | — | @@ -2378,7 +2378,7 @@ |
2379 | 2379 | !! input |
2380 | 2380 | PMID 1234 |
2381 | 2381 | !! result |
2382 | | -<p><a href="http://www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" class="external mw-magiclink-pmid">PMID 1234</a> |
| 2382 | +<p><a class="external mw-magiclink-pmid" href="http://www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a> |
2383 | 2383 | </p> |
2384 | 2384 | !! end |
2385 | 2385 | |
— | — | @@ -3541,7 +3541,7 @@ |
3542 | 3542 | !! input |
3543 | 3543 | [[Image:foobar.jpg|thumb|http://example.com]] |
3544 | 3544 | !! result |
3545 | | -<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="180" height="20" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div><a href="http://example.com" class="external free" rel="nofollow">http://example.com</a></div></div></div> |
| 3545 | +<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="180" height="20" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div></div></div> |
3546 | 3546 | |
3547 | 3547 | !! end |
3548 | 3548 | |
— | — | @@ -3550,7 +3550,7 @@ |
3551 | 3551 | !! input |
3552 | 3552 | [[Image:foobar.jpg|thumb|http://example.com|alt=Alteration]] |
3553 | 3553 | !! result |
3554 | | -<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image"><img alt="Alteration" src="http://example.com/images/3/3a/Foobar.jpg" width="180" height="20" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div><a href="http://example.com" class="external free" rel="nofollow">http://example.com</a></div></div></div> |
| 3554 | +<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image"><img alt="Alteration" src="http://example.com/images/3/3a/Foobar.jpg" width="180" height="20" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div></div></div> |
3555 | 3555 | |
3556 | 3556 | !! end |
3557 | 3557 | |
— | — | @@ -3568,7 +3568,7 @@ |
3569 | 3569 | !! input |
3570 | 3570 | [[Image:foobar.jpg|thumb|This is RFC 12354]] |
3571 | 3571 | !! result |
3572 | | -<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="180" height="20" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>This is <a href="http://tools.ietf.org/html/rfc12354" class="external mw-magiclink-rfc">RFC 12354</a></div></div></div> |
| 3572 | +<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="180" height="20" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>This is <a class="external mw-magiclink-rfc" href="http://tools.ietf.org/html/rfc12354">RFC 12354</a></div></div></div> |
3573 | 3573 | |
3574 | 3574 | !! end |
3575 | 3575 | |
— | — | @@ -3577,7 +3577,7 @@ |
3578 | 3578 | !! input |
3579 | 3579 | [[Image:foobar.jpg|thumb|Please mailto:nobody@example.com]] |
3580 | 3580 | !! result |
3581 | | -<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="180" height="20" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>Please <a href="mailto:nobody@example.com" class="external free" rel="nofollow">mailto:nobody@example.com</a></div></div></div> |
| 3581 | +<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="180" height="20" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>Please <a rel="nofollow" class="external free" href="mailto:nobody@example.com">mailto:nobody@example.com</a></div></div></div> |
3582 | 3582 | |
3583 | 3583 | !! end |
3584 | 3584 | |
— | — | @@ -3691,7 +3691,7 @@ |
3692 | 3692 | !! input |
3693 | 3693 | [[Image:Foobar.jpg|thumb|200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]] |
3694 | 3694 | !! result |
3695 | | -<div class="thumb tright"><div class="thumbinner" style="width:202px;"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="200" height="23" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>This caption has <a href="irc://example.net" class="external text" rel="nofollow">irc</a> and <a href="https://example.com" class="external text" rel="nofollow">Secure</a> ext links in it.</div></div></div> |
| 3695 | +<div class="thumb tright"><div class="thumbinner" style="width:202px;"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="200" height="23" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>This caption has <a rel="nofollow" class="external text" href="irc://example.net">irc</a> and <a rel="nofollow" class="external text" href="https://example.com">Secure</a> ext links in it.</div></div></div> |
3696 | 3696 | |
3697 | 3697 | !! end |
3698 | 3698 | |
— | — | @@ -4150,7 +4150,7 @@ |
4151 | 4151 | !! input |
4152 | 4152 | http://example.com [[Image:foobar.jpg]] |
4153 | 4153 | !! result |
4154 | | -<p><a href="http://example.com" class="external free" rel="nofollow">http://example.com</a> <a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a> |
| 4154 | +<p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> <a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a> |
4155 | 4155 | </p> |
4156 | 4156 | !!end |
4157 | 4157 | |
— | — | @@ -4224,7 +4224,7 @@ |
4225 | 4225 | !! input |
4226 | 4226 | http://example.com[[Image:foobar.jpg]] |
4227 | 4227 | !! result |
4228 | | -<p><a href="http://example.com" class="external free" rel="nofollow">http://example.com</a><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a> |
| 4228 | +<p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a> |
4229 | 4229 | </p> |
4230 | 4230 | !!end |
4231 | 4231 | |
— | — | @@ -4233,7 +4233,7 @@ |
4234 | 4234 | !! input |
4235 | 4235 | http://en.wikinews.org/wiki/Wikinews:Workplace |
4236 | 4236 | !! result |
4237 | | -<p><a href="http://en.wikinews.org/wiki/Wikinews:Workplace" class="external free" rel="nofollow">http://en.wikinews.org/wiki/Wikinews:Workplace</a> |
| 4237 | +<p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a> |
4238 | 4238 | </p> |
4239 | 4239 | !!end |
4240 | 4240 | |
— | — | @@ -5389,11 +5389,11 @@ |
5390 | 5390 | |
5391 | 5391 | mailto:inline@mail.tld |
5392 | 5392 | !! result |
5393 | | -<p><a href="http://first/" class="external autonumber" rel="nofollow">[1]</a> <a href="http://second" class="external autonumber" rel="nofollow">[2]</a> <a href="ftp://ftp" class="external autonumber" rel="nofollow">[3]</a> |
5394 | | -</p><p><a href="ftp://inlineftp" class="external free" rel="nofollow">ftp://inlineftp</a> |
5395 | | -</p><p><a href="mailto:enclosed@mail.tld" class="external text" rel="nofollow">With target</a> |
5396 | | -</p><p><a href="mailto:enclosed@mail.tld" class="external autonumber" rel="nofollow">[4]</a> |
5397 | | -</p><p><a href="mailto:inline@mail.tld" class="external free" rel="nofollow">mailto:inline@mail.tld</a> |
| 5393 | +<p><a rel="nofollow" class="external autonumber" href="http://first/">[1]</a> <a rel="nofollow" class="external autonumber" href="http://second">[2]</a> <a rel="nofollow" class="external autonumber" href="ftp://ftp">[3]</a> |
| 5394 | +</p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a> |
| 5395 | +</p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a> |
| 5396 | +</p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a> |
| 5397 | +</p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a> |
5398 | 5398 | </p> |
5399 | 5399 | !! end |
5400 | 5400 | |
— | — | @@ -5476,7 +5476,7 @@ |
5477 | 5477 | !! result |
5478 | 5478 | <table> |
5479 | 5479 | <tr> |
5480 | | -<th> <a href="irc://{{ftp://a" class="external free" rel="nofollow">irc://{{ftp://a</a>" onmouseover="alert('hello world');" |
| 5480 | +<th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');" |
5481 | 5481 | </th> |
5482 | 5482 | <td> |
5483 | 5483 | </td> |
— | — | @@ -5492,7 +5492,7 @@ |
5493 | 5493 | |
5494 | 5494 | {| |
5495 | 5495 | !!result |
5496 | | -<p><a href="http://===r:::https://b" class="external free" rel="nofollow">http://===r:::https://b</a> |
| 5496 | +<p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a> |
5497 | 5497 | </p> |
5498 | 5498 | <table> |
5499 | 5499 | <tr><td></td></tr> |
— | — | @@ -5556,7 +5556,7 @@ |
5557 | 5557 | !! input |
5558 | 5558 | http://example.com <nowiki>junk</nowiki> |
5559 | 5559 | !! result |
5560 | | -<p><a href="http://example.com" class="external free" rel="nofollow">http://example.com</a> junk |
| 5560 | +<p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk |
5561 | 5561 | </p> |
5562 | 5562 | !!end |
5563 | 5563 | |
— | — | @@ -5566,7 +5566,7 @@ |
5567 | 5567 | !! input |
5568 | 5568 | http://example.com<nowiki>junk</nowiki> |
5569 | 5569 | !! result |
5570 | | -<p><a href="http://example.com" class="external free" rel="nofollow">http://example.com</a>junk |
| 5570 | +<p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk |
5571 | 5571 | </p> |
5572 | 5572 | !!end |
5573 | 5573 | |
— | — | @@ -5576,7 +5576,7 @@ |
5577 | 5577 | !! input |
5578 | 5578 | http://example.com<pre>junk</pre> |
5579 | 5579 | !! result |
5580 | | -<a href="http://example.com" class="external free" rel="nofollow">http://example.com</a><pre>junk</pre> |
| 5580 | +<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre> |
5581 | 5581 | |
5582 | 5582 | !!end |
5583 | 5583 | |
— | — | @@ -6602,7 +6602,7 @@ |
6603 | 6603 | !! input |
6604 | 6604 | **irc://
a |
6605 | 6605 | !! result |
6606 | | -<ul><li><ul><li><a href="irc://%0Aa" class="external free" rel="nofollow">irc://%0Aa</a> |
| 6606 | +<ul><li><ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a> |
6607 | 6607 | </li></ul> |
6608 | 6608 | </li></ul> |
6609 | 6609 | |
— | — | @@ -6709,7 +6709,7 @@ |
6710 | 6710 | <li class="gallerybox" style="width: 155px"><div style="width: 155px"> |
6711 | 6711 | <div style="height: 150px;">Image5.svg</div> |
6712 | 6712 | <div class="gallerytext"> |
6713 | | -<p><a href="http://///////" class="external free" rel="nofollow">http://///////</a> |
| 6713 | +<p><a rel="nofollow" class="external free" href="http://///////">http://///////</a> |
6714 | 6714 | </p> |
6715 | 6715 | </div> |
6716 | 6716 | </div></li> |
— | — | @@ -6876,7 +6876,7 @@ |
6877 | 6877 | !! input |
6878 | 6878 | <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com] |
6879 | 6879 | !! result |
6880 | | -<p><abbr>(fr)</abbr> <a href="https://www.mediawiki.org/wiki/Special:BookSources/2753300917" class="internal mw-magiclink-isbn">ISBN 2753300917</a> <a href="http://www.example.com" class="external text" rel="nofollow">example.com</a> |
| 6880 | +<p><abbr>(fr)</abbr> <a href="https://www.mediawiki.org/wiki/Special:BookSources/2753300917" class="internal mw-magiclink-isbn">ISBN 2753300917</a> <a rel="nofollow" class="external text" href="http://www.example.com">example.com</a> |
6881 | 6881 | </p> |
6882 | 6882 | !! end |
6883 | 6883 | |
— | — | @@ -6885,7 +6885,7 @@ |
6886 | 6886 | !! input |
6887 | 6887 | RFC RFC 1234 |
6888 | 6888 | !! result |
6889 | | -<p>RFC <a href="http://tools.ietf.org/html/rfc1234" class="external mw-magiclink-rfc">RFC 1234</a> |
| 6889 | +<p>RFC <a class="external mw-magiclink-rfc" href="http://tools.ietf.org/html/rfc1234">RFC 1234</a> |
6890 | 6890 | </p> |
6891 | 6891 | !! end |
6892 | 6892 | |
— | — | @@ -6903,7 +6903,7 @@ |
6904 | 6904 | !! input |
6905 | 6905 | RFC 983 987 |
6906 | 6906 | !! result |
6907 | | -<p><a href="http://tools.ietf.org/html/rfc983" class="external mw-magiclink-rfc">RFC 983</a> 987 |
| 6907 | +<p><a class="external mw-magiclink-rfc" href="http://tools.ietf.org/html/rfc983">RFC 983</a> 987 |
6908 | 6908 | </p> |
6909 | 6909 | !! end |
6910 | 6910 | |
— | — | @@ -6997,7 +6997,7 @@ |
6998 | 6998 | !! input |
6999 | 6999 | [[image:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]] |
7000 | 7000 | !! result |
7001 | | -<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="180" height="20" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>An <a href="http://test/?param1=%7Cleft%7C&param2=%7Cx" class="external text" rel="nofollow">external</a> URL</div></div></div> |
| 7001 | +<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="180" height="20" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>An <a rel="nofollow" class="external text" href="http://test/?param1=%7Cleft%7C&param2=%7Cx">external</a> URL</div></div></div> |
7002 | 7002 | |
7003 | 7003 | !!end |
7004 | 7004 | |
— | — | @@ -8002,7 +8002,7 @@ |
8003 | 8003 | !! input |
8004 | 8004 | [http://en.wikipedia.org/] |
8005 | 8005 | !! result |
8006 | | -<p><a href="http://en.wikipedia.org/" class="external autonumber" rel="nofollow">[۱]</a> |
| 8006 | +<p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a> |
8007 | 8007 | </p> |
8008 | 8008 | !! end |
8009 | 8009 | |
Index: trunk/phase3/includes/parser/Parser.php |
— | — | @@ -1111,10 +1111,9 @@ |
1112 | 1112 | throw new MWException( __METHOD__.': unrecognised match type "' . |
1113 | 1113 | substr( $m[0], 0, 20 ) . '"' ); |
1114 | 1114 | } |
1115 | | - $url = wfMsgForContent( $urlmsg, $id); |
| 1115 | + $url = wfMsgForContent( $urlmsg, $id ); |
1116 | 1116 | $sk = $this->mOptions->getSkin( $this->mTitle ); |
1117 | | - $la = $sk->getExternalLinkAttributes( "external $CssClass" ); |
1118 | | - return "<a href=\"{$url}\"{$la}>{$keyword} {$id}</a>"; |
| 1117 | + return $sk->makeExternalLink( $url, "{$keyword} {$id}", true, $CssClass ); |
1119 | 1118 | } elseif ( isset( $m[5] ) && $m[5] !== '' ) { |
1120 | 1119 | # ISBN |
1121 | 1120 | $isbn = $m[5]; |
Index: trunk/phase3/includes/Linker.php |
— | — | @@ -23,8 +23,10 @@ |
24 | 24 | * |
25 | 25 | * @param $class String: the contents of the class attribute; if an empty |
26 | 26 | * string is passed, which is the default value, defaults to 'external'. |
| 27 | + * @deprecated Just pass the external class directly to something using Html::expandAttributes |
27 | 28 | */ |
28 | 29 | function getExternalLinkAttributes( $class = 'external' ) { |
| 30 | + wfDeprecated( __METHOD__ ); |
29 | 31 | return $this->getLinkAttributesInternal( '', $class ); |
30 | 32 | } |
31 | 33 | |
— | — | @@ -795,25 +797,17 @@ |
796 | 798 | * @param $escape Boolean: do we escape the link text? |
797 | 799 | * @param $linktype String: type of external link. Gets added to the classes |
798 | 800 | * @param $attribs Array of extra attributes to <a> |
799 | | - * |
800 | | - * @todo FIXME: This is a really crappy implementation. $linktype and |
801 | | - * 'external' are mashed into the class attrib for the link (which is made |
802 | | - * into a string). Then, if we've got additional params in $attribs, we |
803 | | - * add to it. People using this might want to change the classes (or other |
804 | | - * default link attributes), but passing $attribsText is just messy. Would |
805 | | - * make a lot more sense to make put the classes into $attribs, let the |
806 | | - * hook play with them, *then* expand it all at once. |
807 | 801 | */ |
808 | 802 | function makeExternalLink( $url, $text, $escape = true, $linktype = '', $attribs = array() ) { |
809 | | - if ( isset( $attribs['class'] ) ) { |
810 | | - # yet another hack :( |
811 | | - $class = $attribs['class']; |
812 | | - } else { |
813 | | - $class = "external $linktype"; |
| 803 | + $class = "external"; |
| 804 | + if ( isset($linktype) && $linktype ) { |
| 805 | + $class .= " $linktype"; |
814 | 806 | } |
815 | | - |
816 | | - $attribsText = $this->getExternalLinkAttributes( $class ); |
817 | | - $url = htmlspecialchars( $url ); |
| 807 | + if ( isset($attribs['class']) && $attribs['class'] ) { |
| 808 | + $class .= " {$attribs['class']}"; |
| 809 | + } |
| 810 | + $attribs['class'] = $class; |
| 811 | + |
818 | 812 | if ( $escape ) { |
819 | 813 | $text = htmlspecialchars( $text ); |
820 | 814 | } |
— | — | @@ -823,10 +817,8 @@ |
824 | 818 | wfDebug( "Hook LinkerMakeExternalLink changed the output of link with url {$url} and text {$text} to {$link}\n", true ); |
825 | 819 | return $link; |
826 | 820 | } |
827 | | - if ( $attribs ) { |
828 | | - $attribsText .= Html::expandAttributes( $attribs ); |
829 | | - } |
830 | | - return '<a href="' . $url . '"' . $attribsText . '>' . $text . '</a>'; |
| 821 | + $attribs['href'] = $url; |
| 822 | + return Html::rawElement( 'a', $attribs, $text ); |
831 | 823 | } |
832 | 824 | |
833 | 825 | /** |
Index: trunk/phase3/includes/api/ApiParse.php |
— | — | @@ -388,23 +388,16 @@ |
389 | 389 | return ''; |
390 | 390 | } |
391 | 391 | |
392 | | - $sk = $wgUser->getSkin(); // @todo Kill this once we kill getExternalLinkAttributes |
393 | | - |
394 | 392 | $s = htmlspecialchars( wfMsg( 'otherlanguages' ) . wfMsg( 'colon-separator' ) ); |
395 | 393 | |
396 | 394 | $langs = array(); |
397 | 395 | foreach ( $languages as $l ) { |
398 | 396 | $nt = Title::newFromText( $l ); |
399 | | - $url = $nt->escapeFullURL(); |
400 | 397 | $text = $wgContLang->getLanguageName( $nt->getInterwiki() ); |
401 | | - $title = htmlspecialchars( $nt->getText() ); |
402 | 398 | |
403 | | - if ( $text == '' ) { |
404 | | - $text = $l; |
405 | | - } |
406 | | - |
407 | | - $style = $sk->getExternalLinkAttributes(); // @fixme Linker::getExternalLinkAttributes is best off completely killed |
408 | | - $langs[] = "<a href=\"{$url}\" title=\"{$title}\"{$style}>{$text}</a>"; // @fixme Use Html:: |
| 399 | + $langs[] = Html::element( 'a', |
| 400 | + array( 'href' => $nt->getFullURL(), 'title' => $nt->getText(), 'class' => "external" ), |
| 401 | + $text == '' ? $l : $text ); |
409 | 402 | } |
410 | 403 | |
411 | 404 | $s .= implode( htmlspecialchars( wfMsgExt( 'pipe-separator', 'escapenoentities' ) ), $langs ); |
Index: trunk/phase3/includes/SkinLegacy.php |
— | — | @@ -412,16 +412,11 @@ |
413 | 413 | $first = false; |
414 | 414 | |
415 | 415 | $nt = Title::newFromText( $l ); |
416 | | - $url = $nt->escapeFullURL(); |
417 | 416 | $text = $wgContLang->getLanguageName( $nt->getInterwiki() ); |
418 | | - $title = htmlspecialchars( $nt->getText() ); |
419 | 417 | |
420 | | - if ( $text == '' ) { |
421 | | - $text = $l; |
422 | | - } |
423 | | - |
424 | | - $style = $this->getExternalLinkAttributes(); |
425 | | - $s .= "<a href=\"{$url}\" title=\"{$title}\"{$style}>{$text}</a>"; |
| 418 | + $s .= Html::element( 'a', |
| 419 | + array( 'href' => $nt->getFullURL(), 'title' => $nt->getText(), 'class' => "external" ), |
| 420 | + $text == '' ? $l : $text ); |
426 | 421 | } |
427 | 422 | |
428 | 423 | if ( $wgContLang->isRTL() ) { |