Template:URL/testcases

From blackwiki
Jump to navigation Jump to search
  1. REDIRECT Template:Testcases notice
  • From a page move: This is a redirect from a page that has been moved (renamed) or is the result of a page move. One reason this page was kept as a redirect is to avoid breaking links, both internal and external, that may have been made to the old page name. Any redirect with a page move logged on its history page should be tagged with this rcat template.
{{URL}}
TemplateSandbox
Script error: No such module "URL". Script error: No such module "Template link general".
{{URL| http:// }}
TemplateSandbox
Script error: No such module "URL".
<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-2">Script error: No such module &quot;URL&quot;.</span></strong>
[http:// ]
<span class="url">[http:// ]</span>
{{URL| example.com }}
TemplateSandbox
Script error: No such module "URL".
<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-3">Script error: No such module &quot;URL&quot;.</span></strong>
example.com
<span class="url">[http://example.com example<wbr/>.com]</span>
{{URL| EXAMPLE.COM }}
TemplateSandbox
Script error: No such module "URL".
<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-4">Script error: No such module &quot;URL&quot;.</span></strong>
example.com
<span class="url">[http://EXAMPLE.COM example<wbr/>.com]</span>
{{URL| www.example.com }}
TemplateSandbox
Script error: No such module "URL".
<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-5">Script error: No such module &quot;URL&quot;.</span></strong>
www.example.com
<span class="url">[http://www.example.com www<wbr/>.example<wbr/>.com]</span>
{{URL| WWW.EXAMPLE.COM }}
TemplateSandbox
Script error: No such module "URL".
<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-6">Script error: No such module &quot;URL&quot;.</span></strong>
www.example.com
<span class="url">[http://WWW.EXAMPLE.COM www<wbr/>.example<wbr/>.com]</span>
{{URL| http://www.example.com }}
TemplateSandbox
Script error: No such module "URL".
<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-7">Script error: No such module &quot;URL&quot;.</span></strong>
www.example.com
<span class="url">[http://www.example.com www<wbr/>.example<wbr/>.com]</span>
{{URL| https://www.example.com }}
TemplateSandbox
Script error: No such module "URL".
<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-8">Script error: No such module &quot;URL&quot;.</span></strong>
www.example.com
<span class="url">[https://www.example.com www<wbr/>.example<wbr/>.com]</span>
{{URL| http://www.example.com/ }}
TemplateSandbox
Script error: No such module "URL".
<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-9">Script error: No such module &quot;URL&quot;.</span></strong>
www.example.com
<span class="url">[http://www.example.com/ www<wbr/>.example<wbr/>.com]</span>
{{URL| https://www.EXAMPLE.cOm }}
TemplateSandbox
Script error: No such module "URL".
<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-10">Script error: No such module &quot;URL&quot;.</span></strong>
www.example.com
<span class="url">[https://www.EXAMPLE.cOm www<wbr/>.example<wbr/>.com]</span>
{{URL| HTTPS://www.EXAMPLE.cOm/ }}
TemplateSandbox
Script error: No such module "URL".
<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-11">Script error: No such module &quot;URL&quot;.</span></strong>
www.example.com
<span class="url">[HTTPS://www.EXAMPLE.cOm/ www<wbr/>.example<wbr/>.com]</span>
{{URL| https://www.example.com/ }}
TemplateSandbox
Script error: No such module "URL".
<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-12">Script error: No such module &quot;URL&quot;.</span></strong>
www.example.com
<span class="url">[https://www.example.com/ www<wbr/>.example<wbr/>.com]</span>
{{URL| http://example.com }}
TemplateSandbox
Script error: No such module "URL".
<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-13">Script error: No such module &quot;URL&quot;.</span></strong>
example.com
<span class="url">[http://example.com example<wbr/>.com]</span>
{{URL| https://example.com }}
TemplateSandbox
Script error: No such module "URL".
<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-14">Script error: No such module &quot;URL&quot;.</span></strong>
example.com
<span class="url">[https://example.com example<wbr/>.com]</span>
{{URL| ftp://example.com }}
TemplateSandbox
Script error: No such module "URL".
<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-15">Script error: No such module &quot;URL&quot;.</span></strong>
example.com
<span class="url">[ftp://example.com example<wbr/>.com]</span>
{{URL| ftp://www.example.com/ }}
TemplateSandbox
Script error: No such module "URL".
<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-16">Script error: No such module &quot;URL&quot;.</span></strong>
www.example.com
<span class="url">[ftp://www.example.com/ www<wbr/>.example<wbr/>.com]</span>
{{URL| http://www.example.com/foo/bar }}
TemplateSandbox
Script error: No such module "URL".
<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-17">Script error: No such module &quot;URL&quot;.</span></strong>
www.example.com/foo/bar
<span class="url">[http://www.example.com/foo/bar www<wbr/>.example<wbr/>.com<wbr/>/foo<wbr/>/bar]</span>
{{URL| http://www.example.com/foo/bar/ }}
TemplateSandbox
Script error: No such module "URL".
<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-18">Script error: No such module &quot;URL&quot;.</span></strong>
www.example.com/foo/bar/
<span class="url">[http://www.example.com/foo/bar/ www<wbr/>.example<wbr/>.com<wbr/>/foo<wbr/>/bar<wbr/>/]</span>
{{URL| http://www.example.com/foO/BaR }}
TemplateSandbox
Script error: No such module "URL".
<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-19">Script error: No such module &quot;URL&quot;.</span></strong>
www.example.com/foO/BaR
<span class="url">[http://www.example.com/foO/BaR www<wbr/>.example<wbr/>.com<wbr/>/foO<wbr/>/BaR]</span>
{{URL| https://www.example.com/foo/bar }}
TemplateSandbox
Script error: No such module "URL".
<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-20">Script error: No such module &quot;URL&quot;.</span></strong>
www.example.com/foo/bar
<span class="url">[https://www.example.com/foo/bar www<wbr/>.example<wbr/>.com<wbr/>/foo<wbr/>/bar]</span>
{{URL| http://example.com/foo/bar }}
TemplateSandbox
Script error: No such module "URL".
<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-21">Script error: No such module &quot;URL&quot;.</span></strong>
example.com/foo/bar
<span class="url">[http://example.com/foo/bar example<wbr/>.com<wbr/>/foo<wbr/>/bar]</span>
{{URL| https://example.com/foo/bar }}
TemplateSandbox
Script error: No such module "URL".
<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-22">Script error: No such module &quot;URL&quot;.</span></strong>
example.com/foo/bar
<span class="url">[https://example.com/foo/bar example<wbr/>.com<wbr/>/foo<wbr/>/bar]</span>
{{URL| example.com/foo/bar }}
TemplateSandbox
Script error: No such module "URL".
<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-23">Script error: No such module &quot;URL&quot;.</span></strong>
example.com/foo/bar
<span class="url">[http://example.com/foo/bar example<wbr/>.com<wbr/>/foo<wbr/>/bar]</span>
{{URL| www.example.com/foo/bar }}
TemplateSandbox
Script error: No such module "URL".
<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-24">Script error: No such module &quot;URL&quot;.</span></strong>
www.example.com/foo/bar
<span class="url">[http://www.example.com/foo/bar www<wbr/>.example<wbr/>.com<wbr/>/foo<wbr/>/bar]</span>
{{URL| http://example.com/foo/bar | }}
TemplateSandbox
Script error: No such module "URL".
<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-25">Script error: No such module &quot;URL&quot;.</span></strong>
example.com/foo/bar
<span class="url">[http://example.com/foo/bar example<wbr/>.com<wbr/>/foo<wbr/>/bar]</span>
{{URL|1=http://www.example.com?foo=BaR}}
TemplateSandbox
Script error: No such module "URL".
<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-26">Script error: No such module &quot;URL&quot;.</span></strong>
www.example.com?foo=BaR
<span class="url">[http://www.example.com?foo=BaR www<wbr/>.example<wbr/>.com?foo=BaR]</span>
{{URL| http://www.example.com#fooBaR }}
TemplateSandbox
Script error: No such module "URL".
<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-27">Script error: No such module &quot;URL&quot;.</span></strong>
www.example.com#fooBaR
<span class="url">[http://www.example.com#fooBaR www<wbr/>.example<wbr/>.com<wbr/>#fooBaR]</span>
{{URL| http://www.example.com }}
TemplateSandbox
Script error: No such module "URL".
<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-28">Script error: No such module &quot;URL&quot;.</span></strong>
www.example.com
<span class="url">[http://www.example.com www<wbr/>.example<wbr/>.com]</span>
{{URL| http://www.example.com:8080 }}
TemplateSandbox
Script error: No such module "URL".
<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-29">Script error: No such module &quot;URL&quot;.</span></strong>
www.example.com:8080
<span class="url">[http://www.example.com:8080 www<wbr/>.example<wbr/>.com:8080]</span>
{{URL| http://www.example.com:8080/foo/bar }}
TemplateSandbox
Script error: No such module "URL".
<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-30">Script error: No such module &quot;URL&quot;.</span></strong>
www.example.com:8080/foo/bar
<span class="url">[http://www.example.com:8080/foo/bar www<wbr/>.example<wbr/>.com:8080<wbr/>/foo<wbr/>/bar]</span>
{{URL| www.example.com:8080 }}
TemplateSandbox
Script error: No such module "URL".
<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-31">Script error: No such module &quot;URL&quot;.</span></strong>
www.example.com:8080
<span class="url">[http://www.example.com:8080 www<wbr/>.example<wbr/>.com:8080]</span>
{{URL| www.example.com:8080/foo/bar }}
TemplateSandbox
Script error: No such module "URL".
<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-32">Script error: No such module &quot;URL&quot;.</span></strong>
www.example.com:8080/foo/bar
<span class="url">[http://www.example.com:8080/foo/bar www<wbr/>.example<wbr/>.com:8080<wbr/>/foo<wbr/>/bar]</span>
{{URL| http://www.example.com/foo bar }}
TemplateSandbox
Script error: No such module "URL".
<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-33">Script error: No such module &quot;URL&quot;.</span></strong>
www.example.com/foo%20bar
<span class="url">[http://www.example.com/foo%20bar www<wbr/>.example<wbr/>.com<wbr/>/foo%20bar]</span>
{{URL| www.example.com/foo bar }}
TemplateSandbox
Script error: No such module "URL".
<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-34">Script error: No such module &quot;URL&quot;.</span></strong>
www.example.com/foo%20bar
<span class="url">[http://www.example.com/foo%20bar www<wbr/>.example<wbr/>.com<wbr/>/foo%20bar]</span>
{{URL| http://example.com/foo/bar | link }}
TemplateSandbox
Script error: No such module "URL".
<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-35">Script error: No such module &quot;URL&quot;.</span></strong>
link
<span class="url">[http://example.com/foo/bar link]</span>
{{URL| https://example.com/foo/bar | link }}
TemplateSandbox
Script error: No such module "URL".
<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-36">Script error: No such module &quot;URL&quot;.</span></strong>
link
<span class="url">[https://example.com/foo/bar link]</span>
{{URL| example.com/foo/bar | link }}
TemplateSandbox
Script error: No such module "URL".
<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-37">Script error: No such module &quot;URL&quot;.</span></strong>
link
<span class="url">[http://example.com/foo/bar link]</span>
{{URL| www.example.com/foo/bar | link }}
TemplateSandbox
Script error: No such module "URL".
<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-38">Script error: No such module &quot;URL&quot;.</span></strong>
link
<span class="url">[http://www.example.com/foo/bar link]</span>
{{URL| www.example.com/foo/bar | 捦挺挎 }}
TemplateSandbox
Script error: No such module "URL".
<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-39">Script error: No such module &quot;URL&quot;.</span></strong>
捦挺挎
<span class="url">[http://www.example.com/foo/bar 捦挺挎]</span>
{{URL| www.example.com/foo/捦挺挎/bar | link }}
TemplateSandbox
Script error: No such module "URL".
<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-40">Script error: No such module &quot;URL&quot;.</span></strong>
link
<span class="url">[http://www.example.com/foo/捦挺挎/bar link]</span>
{{URL| عمان.icom.museum }}
TemplateSandbox
Script error: No such module "URL".
<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-41">Script error: No such module &quot;URL&quot;.</span></strong>
عمان.icom.museum
<span class="url">[http://عمان.icom.museum عمان<wbr/>.icom<wbr/>.museum]</span>
{{URL| http://عمان.icom.museum }}
TemplateSandbox
Script error: No such module "URL".
<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-42">Script error: No such module &quot;URL&quot;.</span></strong>
عمان.icom.museum
<span class="url">[http://عمان.icom.museum عمان<wbr/>.icom<wbr/>.museum]</span>
{{URL| 1964thetribute.com }}
TemplateSandbox
Script error: No such module "URL".
<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-43">Script error: No such module &quot;URL&quot;.</span></strong>
1964thetribute.com
<span class="url">[http://1964thetribute.com 1964thetribute<wbr/>.com]</span>
{{URL| 1964thetribute.com | 1964thetribute.com }}
TemplateSandbox
Script error: No such module "URL".
<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-44">Script error: No such module &quot;URL&quot;.</span></strong>
1964thetribute.com
<span class="url">[http://1964thetribute.com 1964thetribute.com]</span>
{{URL|http://www.example.com/foo/bar?a=b&c=d}}
TemplateSandbox
Script error: No such module "URL". www.example.com/foo/bar?a=b&c=d
{{URL| http:www.example.com }}
TemplateSandbox
Script error: No such module "URL".
<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-46">Script error: No such module &quot;URL&quot;.</span></strong>
www.example.com
<span class="url">[http://www.example.com www<wbr/>.example<wbr/>.com]</span>
{{URL| http:/www.example.com }}
TemplateSandbox
Script error: No such module "URL".
<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-47">Script error: No such module &quot;URL&quot;.</span></strong>
www.example.com
<span class="url">[http://www.example.com www<wbr/>.example<wbr/>.com]</span>
{{URL| http://www.example.com/# }}
TemplateSandbox
Script error: No such module "URL".
<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-48">Script error: No such module &quot;URL&quot;.</span></strong>
www.example.com
<span class="url">[http://www.example.com/ www<wbr/>.example<wbr/>.com]</span>
{{URL| http://www.example.com/? }}
TemplateSandbox
Script error: No such module "URL".
<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-49">Script error: No such module &quot;URL&quot;.</span></strong>
www.example.com
<span class="url">[http://www.example.com/ www<wbr/>.example<wbr/>.com]</span>
{{URL| http://www.example1.com<br>http://www.example2.com }}
TemplateSandbox
Script error: No such module "URL".
<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-50">Script error: No such module &quot;URL&quot;.</span></strong>

http://www.example2.com http://www.example1.com
http://www.example2.com
<span class="url">[http://www.example1.com<br>http://www.example2.com http://www.example1.com<br>http://www.example2.com]</span>
{{URL| http://www.example1.com and http://www.example2.com/ }}
TemplateSandbox
Script error: No such module "URL".
<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-51">Script error: No such module &quot;URL&quot;.</span></strong>
http://www.example1.com%20and%20http://www.example2.com/
<span class="url">[http://www.example1.com%20and%20http://www.example2.com/ http://www.example1.com%20and%20http://www.example2.com/]</span>
{{URL|1=http://www.example.com/foo/bar?a=b&c=d}}
TemplateSandbox
Script error: No such module "URL".
<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-52">Script error: No such module &quot;URL&quot;.</span></strong>
www.example.com/foo/bar?a=b&c=d
<span class="url">[http://www.example.com/foo/bar?a=b&c=d www<wbr/>.example<wbr/>.com<wbr/>/foo<wbr/>/bar?a=b&c=d]</span>
{{URL|2=example.com}}
TemplateSandbox
Script error: No such module "URL".
<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-53">Script error: No such module &quot;URL&quot;.</span></strong>
example.com
example.com
{{URL|2=http://example.com/foo}}
TemplateSandbox
Script error: No such module "URL".
<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-54">Script error: No such module &quot;URL&quot;.</span></strong>
http://example.com/foo
http://example.com/foo
{{URL| http://www.example.com | example }}
TemplateSandbox
Script error: No such module "URL".
<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-55">Script error: No such module &quot;URL&quot;.</span></strong>
example
<span class="url">[http://www.example.com example]</span>
{{URL| 1=http://www.sho.com/site/dexter/home.sho| 2=''Dexter''{{'}}s official website}}
TemplateSandbox
Script error: No such module "URL".
<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-56">Script error: No such module &quot;URL&quot;.</span></strong>
Dexter's official website
<span class="url">[http://www.sho.com/site/dexter/home.sho ''Dexter''<span class="nowrap" style="padding-left:0.1em;">&#39;</span>s official website]</span>

Warning examples

If the URL may contain equal signs, the parameters should be numbered explicitly to have the template work as expected (otherwise, parameter value overrides may occur) ; this is more problematic when an explicit display text is provided in parameter 2.

There's absolutely never any problem when the parameter 2 is explicitly passed, but in this case, using this template is not even needed, and standard Wiki link syntax will be fully equivalent and in fact simpler to edit and faster to compute on the server.

Code Result Sandbox Result
{{URL| http://www.ex=ample.com}} Script error: No such module "URL". www.ex=ample.com
{{URL| http://www.ex=ample.com | example }} Script error: No such module "URL". example
{{URL| 1=http://www.ex=ample.com | 2=example }} Script error: No such module "URL". example


Word wrapping test

Code Result Sandbox Result Manual invokation
{{URL| 1=www.adobe.com/devnet/pdf/pdf_reference_archive.html}} Script error: No such module "URL". www.adobe.com/devnet/pdf/pdf_reference_archive.html www.adobe.com/devnet/pdf/pdf_reference_archive.html
{{URL| 1=http://en.m.wikipedia.org/w/index.php?title=User:Codename_Lisa/sandbox&oldid=636147649}} Script error: No such module "URL". en.m.wikipedia.org/w/index.php?title=User%3ACodename_Lisa%2Fsandbox&oldid=636147649 en.m.wikipedia.org/w/index.php?title=User%3ACodename_Lisa%2Fsandbox&oldid=636147649
{{URL| 1=http://windows.microsoft.com/en-us/windows/turn-off-computer-faq#1TC=windows-vista}} Script error: No such module "URL". windows.microsoft.com/en-us/windows/turn-off-computer-faq#1TC=windows-vista windows.microsoft.com/en-us/windows/turn-off-computer-faq#1TC=windows-vista
{{URL| 1=http://vvv.some_domain_name.local/some_folder_name/yet.another.foldername/some-other-folder-name/}} Script error: No such module "URL". vvv.some_domain_name.local/some_folder_name/yet.another.foldername/some-other-folder-name/ vvv.some_domain_name.local/some_folder_name/yet.another.foldername/some-other-folder-name/
{{URL| 1=http://www.example.com/?some+request+with+plus+in+it}} Script error: No such module "URL". www.example.com?some+request+with+plus+in+it www.example.com?some+request+with+plus+in+it
Code Result Sandbox Result Manual invokation
{{URL| 1=http://www.example.com |2=Supercalifragilistic__expialidocious}} Script error: No such module "URL". Supercalifragilistic__expialidocious Supercalifragilistic__expialidocious
{{URL| 1=http://www.example.com |2=Supercalifragilistic//expialidocious}} Script error: No such module "URL". Supercalifragilistic//expialidocious Supercalifragilistic//expialidocious
{{URL| 1=http://www.example.com |2=Supercalifragilistic..expialidocious}} Script error: No such module "URL". Supercalifragilistic..expialidocious Supercalifragilistic..expialidocious
{{URL| 1=http://www.example.com |2=Supercalifragilistic##expialidocious}} Script error: No such module "URL". Supercalifragilistic##expialidocious Supercalifragilistic##expialidocious