Template:MediaWiki URL rules: Difference between revisions
From All Skies Encyclopaedia
imported>Lambiam (in urls in citation templates (which is what this documentation template documents) the characters , ; ? \ . : ! ) are all fine, but | isn't) |
imported>Uzma Gamal No edit summary |
||
Line 1: | Line 1: | ||
:URLs must begin with a supported [[URI scheme]]: <code>http://</code> and <code>https://</code> will be supported by all browsers; <code>irc://</code>, <code>ircs://</code>, <code>ftp://</code>, <code>news:</code>, <code>mailto:</code> and <code>gopher://</code> will require a plugin or an external application and should normally be avoided. IPv6 host-names are currently not supported. |
:URLs must begin with a supported [[URI scheme]]: <code>http://</code> and <code>https://</code> will be supported by all browsers; <code>irc://</code>, <code>ircs://</code>, <code>ftp://</code>, <code>news:</code>, <code>mailto:</code> and <code>gopher://</code> will require a plugin 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 they will display and link incorrectly. Those characters need to be percent-encoded. For example, a space must be replaced by <code>%20</code>. To encode the URL, replace these characters: |
:If URLs in citation template parameters contain certain characters they will display and link incorrectly. Those characters need to be [[percent-encoded]]. For example, a space must be replaced by <code>%20</code>. To encode the URL, replace these characters: |
||
{| class="wikitable" style="margin-left: 5em" |
{| class="wikitable" style="margin-left: 5em" |
||
! sp !! " !! ' !! < !! > !! [ !! ] !! <nowiki>|</nowiki> !! } |
! sp !! " !! ' !! < !! > !! [ !! ] !! <nowiki>|</nowiki> !! } |
Revision as of 12:34, 9 December 2012
- URLs must begin with a supported URI scheme:
http://
andhttps://
will be supported by all browsers;irc://
,ircs://
,ftp://
,news:
,mailto:
andgopher://
will require a plugin 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 they will display and link incorrectly. Those characters need to be percent-encoded. For example, a space must be replaced by
%20
. To encode the URL, replace these characters:
sp | " | ' | < | > | [ | ] | | | } |
---|---|---|---|---|---|---|---|---|
%20 | %22 | %27 | %3c | %3e | %5b | %5d | %7c | %7d |
- Single apostrophes do not need to be encoded; but unencoded multiples will be parsed as italic or bold markup. Single curly closing braces also do not need to be encoded; but an unencoded pair will be parsed as the double closing braces for the template transclusion.