Модуль:URL/документація

Матеріал з Вікіпедії — вільної енциклопедії.
Перейти до навігації Перейти до пошуку

Модуль використовується в шаблонах {{url}} (обг. · викор. · ред.), {{Wikidata/p856}} (обг. · викор. · ред.).

Категорії підтримки

[ред. код]


Тести

[ред. код]

4 з 61 тесту не пройшли.

test_url
Текст Очікуваний Фактичний
Ні {{#invoke:URL|url}} {{URL|example.com|необов'язковий опис}} {{URL|example.com|необов'язковий опис}}
Ні {{#invoke:URL|url|}} {{URL|example.com|необов'язковий опис}} {{URL|example.com|необов'язковий опис}}
Ні {{#invoke:URL|url||}} {{URL|example.com|необов'язковий опис}} {{URL|example.com|необов'язковий опис}}
Ні {{#invoke:URL|url|http://www.example.com/foo/bar?a=b&c=d}} {{URL|example.com|необов'язковий опис}} {{URL|example.com|необов'язковий опис}}
YesТак {{#invoke:URL|url|EXAMPLE.com}} <span class="url">[http://EXAMPLE.com example.com]</span> <span class="url">[http://EXAMPLE.com example.com]</span>
YesТак {{#invoke:URL|url|example.com}} <span class="url">[http://example.com example.com]</span> <span class="url">[http://example.com example.com]</span>
YesТак {{#invoke:URL|url|www.example.com}} <span class="url">[http://www.example.com www.example.com]</span> <span class="url">[http://www.example.com www.example.com]</span>
YesТак {{#invoke:URL|url|http://www.example.com}} <span class="url">[http://www.example.com www.example.com]</span> <span class="url">[http://www.example.com www.example.com]</span>
YesТак {{#invoke:URL|url|https://www.example.com}} <span class="url">[https://www.example.com www.example.com]</span> <span class="url">[https://www.example.com www.example.com]</span>
YesТак {{#invoke:URL|url|ftp://www.example.com}} <span class="url">[ftp://www.example.com www.example.com]</span> <span class="url">[ftp://www.example.com www.example.com]</span>
YesТак {{#invoke:URL|url|ftp://ftp.example.com}} <span class="url">[ftp://ftp.example.com ftp.example.com]</span> <span class="url">[ftp://ftp.example.com ftp.example.com]</span>
YesТак {{#invoke:URL|url|http://www.example.com/}} <span class="url">[http://www.example.com/ www.example.com]</span> <span class="url">[http://www.example.com/ www.example.com]</span>
YesТак {{#invoke:URL|url|http://www.example.com/path}} <span class="url">[http://www.example.com/path www.example.com/path]</span> <span class="url">[http://www.example.com/path www.example.com/path]</span>
YesТак {{#invoke:URL|url|www.example.com/foo}} <span class="url">[http://www.example.com/foo www.example.com/foo]</span> <span class="url">[http://www.example.com/foo www.example.com/foo]</span>
YesТак {{#invoke:URL|url|http://www.example.com/foo | link}} <span class="url">[http://www.example.com/foo link]</span> <span class="url">[http://www.example.com/foo link]</span>
YesТак {{#invoke:URL|url|www.example.com/foo | link}} <span class="url">[http://www.example.com/foo link]</span> <span class="url">[http://www.example.com/foo link]</span>
YesТак {{#invoke:URL|url|http://www.example.com/path/}} <span class="url">[http://www.example.com/path/ www.example.com/path/]</span> <span class="url">[http://www.example.com/path/ www.example.com/path/]</span>
YesТак {{#invoke:URL|url|www.example.com/foo/}} <span class="url">[http://www.example.com/foo/ www.example.com/foo/]</span> <span class="url">[http://www.example.com/foo/ www.example.com/foo/]</span>
YesТак {{#invoke:URL|url|1=http://www.example.com/path?section=17}} <span class="url">[http://www.example.com/path?section=17 www.example.com/path?section=17]</span> <span class="url">[http://www.example.com/path?section=17 www.example.com/path?section=17]</span>
YesТак {{#invoke:URL|url|1=www.example.com/foo?page=42 }} <span class="url">[http://www.example.com/foo?page=42 www.example.com/foo?page=42]</span> <span class="url">[http://www.example.com/foo?page=42 www.example.com/foo?page=42]</span>
YesТак {{#invoke:URL|url|http://www.example.com/foo/ | link}} <span class="url">[http://www.example.com/foo/ link]</span> <span class="url">[http://www.example.com/foo/ link]</span>
YesТак {{#invoke:URL|url|www.example.com/foo/ | link}} <span class="url">[http://www.example.com/foo/ link]</span> <span class="url">[http://www.example.com/foo/ link]</span>
YesТак {{#invoke:URL|url|http://}} <span class="url">[http:// ]</span> <span class="url">[http:// ]</span>
YesТак {{#invoke:URL|url|WWW.EXAMPLE.COM}} <span class="url">[http://WWW.EXAMPLE.COM www.example.com]</span> <span class="url">[http://WWW.EXAMPLE.COM www.example.com]</span>
YesТак {{#invoke:URL|url|https://www.EXAMPLE.cOm}} <span class="url">[https://www.EXAMPLE.cOm www.example.com]</span> <span class="url">[https://www.EXAMPLE.cOm www.example.com]</span>
YesТак {{#invoke:URL|url|HTTPS://www.EXAMPLE.cOm/}} <span class="url">[HTTPS://www.EXAMPLE.cOm/ www.example.com]</span> <span class="url">[HTTPS://www.EXAMPLE.cOm/ www.example.com]</span>
YesТак {{#invoke:URL|url|https://www.example.com/}} <span class="url">[https://www.example.com/ www.example.com]</span> <span class="url">[https://www.example.com/ www.example.com]</span>
YesТак {{#invoke:URL|url|http://example.com}} <span class="url">[http://example.com example.com]</span> <span class="url">[http://example.com example.com]</span>
YesТак {{#invoke:URL|url|https://example.com}} <span class="url">[https://example.com example.com]</span> <span class="url">[https://example.com example.com]</span>
YesТак {{#invoke:URL|url|ftp://example.com}} <span class="url">[ftp://example.com example.com]</span> <span class="url">[ftp://example.com example.com]</span>
YesТак {{#invoke:URL|url|http://www.example.com/foo/bar}} <span class="url">[http://www.example.com/foo/bar www.example.com/foo/bar]</span> <span class="url">[http://www.example.com/foo/bar www.example.com/foo/bar]</span>
YesТак {{#invoke:URL|url|http://www.example.com/foo/bar/}} <span class="url">[http://www.example.com/foo/bar/ www.example.com/foo/bar/]</span> <span class="url">[http://www.example.com/foo/bar/ www.example.com/foo/bar/]</span>
YesТак {{#invoke:URL|url|http://www.example.com/foO/BaR}} <span class="url">[http://www.example.com/foO/BaR www.example.com/foO/BaR]</span> <span class="url">[http://www.example.com/foO/BaR www.example.com/foO/BaR]</span>
YesТак {{#invoke:URL|url|https://www.example.com/foo/bar}} <span class="url">[https://www.example.com/foo/bar www.example.com/foo/bar]</span> <span class="url">[https://www.example.com/foo/bar www.example.com/foo/bar]</span>
YesТак {{#invoke:URL|url|http://example.com/foo/bar}} <span class="url">[http://example.com/foo/bar example.com/foo/bar]</span> <span class="url">[http://example.com/foo/bar example.com/foo/bar]</span>
YesТак {{#invoke:URL|url|https://example.com/foo/bar}} <span class="url">[https://example.com/foo/bar example.com/foo/bar]</span> <span class="url">[https://example.com/foo/bar example.com/foo/bar]</span>
YesТак {{#invoke:URL|url|example.com/foo/bar}} <span class="url">[http://example.com/foo/bar example.com/foo/bar]</span> <span class="url">[http://example.com/foo/bar example.com/foo/bar]</span>
YesТак {{#invoke:URL|url|www.example.com/foo/bar}} <span class="url">[http://www.example.com/foo/bar www.example.com/foo/bar]</span> <span class="url">[http://www.example.com/foo/bar www.example.com/foo/bar]</span>
YesТак {{#invoke:URL|url|http://example.com/foo/bar | }} <span class="url">[http://example.com/foo/bar example.com/foo/bar]</span> <span class="url">[http://example.com/foo/bar example.com/foo/bar]</span>
YesТак {{#invoke:URL|url|1=http://www.example.com?foo=BaR}} <span class="url">[http://www.example.com?foo=BaR www.example.com?foo=BaR]</span> <span class="url">[http://www.example.com?foo=BaR www.example.com?foo=BaR]</span>
YesТак {{#invoke:URL|url|http://www.example.com#fooBaR}} <span class="url">[http://www.example.com#fooBaR www.example.com#fooBaR]</span> <span class="url">[http://www.example.com#fooBaR www.example.com#fooBaR]</span>
YesТак {{#invoke:URL|url|http://www.example.com:8080}} <span class="url">[http://www.example.com:8080 www.example.com:8080]</span> <span class="url">[http://www.example.com:8080 www.example.com:8080]</span>
YesТак {{#invoke:URL|url|http://www.example.com:8080/foo/bar}} <span class="url">[http://www.example.com:8080/foo/bar www.example.com:8080/foo/bar]</span> <span class="url">[http://www.example.com:8080/foo/bar www.example.com:8080/foo/bar]</span>
YesТак {{#invoke:URL|url|www.example.com:8080}} <span class="url">[http://www.example.com:8080 www.example.com:8080]</span> <span class="url">[http://www.example.com:8080 www.example.com:8080]</span>
YesТак {{#invoke:URL|url|www.example.com:8080/foo/bar}} <span class="url">[http://www.example.com:8080/foo/bar www.example.com:8080/foo/bar]</span> <span class="url">[http://www.example.com:8080/foo/bar www.example.com:8080/foo/bar]</span>
YesТак {{#invoke:URL|url|http://www.example.com/foo bar}} <span class="url">[http://www.example.com/foo%20bar www.example.com/foo%20bar]</span> <span class="url">[http://www.example.com/foo%20bar www.example.com/foo%20bar]</span>
YesТак {{#invoke:URL|url|www.example.com/foo bar}} <span class="url">[http://www.example.com/foo%20bar www.example.com/foo%20bar]</span> <span class="url">[http://www.example.com/foo%20bar www.example.com/foo%20bar]</span>
YesТак {{#invoke:URL|url|http://example.com/foo/bar | link}} <span class="url">[http://example.com/foo/bar link]</span> <span class="url">[http://example.com/foo/bar link]</span>
YesТак {{#invoke:URL|url|https://example.com/foo/bar | link}} <span class="url">[https://example.com/foo/bar link]</span> <span class="url">[https://example.com/foo/bar link]</span>
YesТак {{#invoke:URL|url|example.com/foo/bar | link}} <span class="url">[http://example.com/foo/bar link]</span> <span class="url">[http://example.com/foo/bar link]</span>
YesТак {{#invoke:URL|url|www.example.com/foo/bar | link}} <span class="url">[http://www.example.com/foo/bar link]</span> <span class="url">[http://www.example.com/foo/bar link]</span>
YesТак {{#invoke:URL|url|www.example.com/foo/bar | 捦挺挎}} <span class="url">[http://www.example.com/foo/bar 捦挺挎]</span> <span class="url">[http://www.example.com/foo/bar 捦挺挎]</span>
YesТак {{#invoke:URL|url|www.example.com/foo/捦挺挎/bar | link}} <span class="url">[http://www.example.com/foo/捦挺挎/bar link]</span> <span class="url">[http://www.example.com/foo/捦挺挎/bar link]</span>
YesТак {{#invoke:URL|url|عمان.icom.museum}} <span class="url">[http://عمان.icom.museum عمان.icom.museum]</span> <span class="url">[http://عمان.icom.museum عمان.icom.museum]</span>
YesТак {{#invoke:URL|url|http://عمان.icom.museum}} <span class="url">[http://عمان.icom.museum عمان.icom.museum]</span> <span class="url">[http://عمان.icom.museum عمان.icom.museum]</span>
YesТак {{#invoke:URL|url|1964thetribute.com}} <span class="url">[http://1964thetribute.com 1964thetribute.com]</span> <span class="url">[http://1964thetribute.com 1964thetribute.com]</span>
YesТак {{#invoke:URL|url|1964thetribute.com | 1964thetribute.com}} <span class="url">[http://1964thetribute.com 1964thetribute.com]</span> <span class="url">[http://1964thetribute.com 1964thetribute.com]</span>
YesТак {{#invoke:URL|url|1= http://www.example.com/foo/bar?a=b&c=d}} <span class="url">[http://www.example.com/foo/bar?a=b&c=d www.example.com/foo/bar?a=b&c=d]</span> <span class="url">[http://www.example.com/foo/bar?a=b&c=d www.example.com/foo/bar?a=b&c=d]</span>
YesТак {{#invoke:URL|url|1=www.hti.umich.edu/cgi/t/text/pageviewer-idx?c=umhistmath;cc=umhistmath;rgn=full%20text;idno=ABS3153.0001.001;didno=ABS3153.0001.001;view=image;seq=00000140}} <span class="url">[http://www.hti.umich.edu/cgi/t/text/pageviewer-idx?c=umhistmath;cc=umhistmath;rgn=full%20text;idno=ABS3153.0001.001;didno=ABS3153.0001.001;view=image;seq=00000140 www.hti.umich.edu/cgi/t/text/pageviewer-idx?c=umhistmath%3Bcc%3Dumhistmath%3Brgn%3Dfull+text%3Bidno%3DABS3153.0001.001%3Bdidno%3DABS3153.0001.001%3Bview%3Dimage%3Bseq%3D00000140]</span> <span class="url">[http://www.hti.umich.edu/cgi/t/text/pageviewer-idx?c=umhistmath;cc=umhistmath;rgn=full%20text;idno=ABS3153.0001.001;didno=ABS3153.0001.001;view=image;seq=00000140 www.hti.umich.edu/cgi/t/text/pageviewer-idx?c=umhistmath%3Bcc%3Dumhistmath%3Brgn%3Dfull+text%3Bidno%3DABS3153.0001.001%3Bdidno%3DABS3153.0001.001%3Bview%3Dimage%3Bseq%3D00000140]</span>
YesТак {{#invoke:URL|url|2= example.com}} example.com example.com
YesТак {{#invoke:URL|url|2= http://example.com/foo}} http://example.com/foo http://example.com/foo


Див. також

[ред. код]


Це сторінка документації для Модуль:URL