Difference between revisions of "Template:MediaWiki URL rules"
From Timelines
(Remove formatting text as small. Having the final paragraph as small text is distracting. It is not consistent with the formatting elsewhere and the issue is not of lesser important than any other mentioned.) |
(Adding percent-code for left bracket) |
||
Line 2: | Line 2: | ||
:If URLs in citation template parameters contain certain characters, then they will not display and link correctly. Those characters need to be [[percent-encoded]]. For example, a space must be replaced by <code>%20</code>. To encode the URL, replace the following characters with: | :If URLs in citation template parameters contain certain characters, then they will not display and link correctly. Those characters need to be [[percent-encoded]]. For example, a space must be replaced by <code>%20</code>. To encode the URL, replace the following characters with: | ||
{| class="wikitable" style="margin-left: 5em" | {| class="wikitable" style="margin-left: 5em" | ||
− | ! sp !! " !! ' !! < !! > !! [ !! ] !! <nowiki>|</nowiki> !! } | + | ! sp !! " !! ' !! < !! > !! [ !! ] !! { !! <nowiki>|</nowiki> !! } |
|- | |- | ||
− | || %20 || %22 || %27 || %3c || %3e || %5b || %5d || %7c || %7d | + | || %20 || %22 || %27 || %3c || %3e || %5b || %5d || %7b || %7c || %7d |
|} | |} | ||
:Single apostrophes do not need to be encoded; however, unencoded multiples will be parsed as italic or bold markup. Single curly closing braces also do not need to be encoded; however, an unencoded pair will be parsed as the double closing braces for the template transclusion.<noinclude> | :Single apostrophes do not need to be encoded; however, unencoded multiples will be parsed as italic or bold markup. Single curly closing braces also do not need to be encoded; however, an unencoded pair will be parsed as the double closing braces for the template transclusion.<noinclude> | ||
{{documentation}} | {{documentation}} | ||
</noinclude> | </noinclude> |
Revision as of 14:58, 10 May 2014
- URLs must begin with a supported URI scheme.
http://
andhttps://
will be supported by all browsers; however,ftp://
,gopher://
,irc://
,ircs://
,mailto:
andnews:
will require a plug-in or an external application and should normally be avoided. IPv6 host-names are currently not supported. - If URLs in citation template parameters contain certain characters, then they will not display and link correctly. Those characters need to be percent-encoded. For example, a space must be replaced by
%20
. To encode the URL, replace the following characters with:
sp | " | ' | < | > | [ | ] | { | | | } |
---|---|---|---|---|---|---|---|---|---|
%20 | %22 | %27 | %3c | %3e | %5b | %5d | %7b | %7c | %7d |
- Single apostrophes do not need to be encoded; however, unencoded multiples will be parsed as italic or bold markup. Single curly closing braces also do not need to be encoded; however, an unencoded pair will be parsed as the double closing braces for the template transclusion.
Template documentation[create]
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |