模板:MediaWiki URL rules

来自决策链云智库
Zeroclanzhang讨论 | 贡献2024年1月17日 (三) 00:57的版本 (创建页面,内容为“URLs must begin with a supported URI scheme. <code>http://</code> and <code>https://</code> will be supported by all browsers; however, <code>ftp://</code>, <code>gopher://</code>, <code>irc://</code>, <code>ircs://</code>, <code>mailto:</code> and <code>news:</code> may require a plug-in or an external application and should normally be avoided. IPv6 host-names are currently not supported. If URLs in Wikipedia:Citation_templates#Examples|citation te…”)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)

URLs must begin with a supported URI scheme. http:// and https:// will be supported by all browsers; however, ftp://, gopher://, irc://, ircs://, mailto: and news: may 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:

Character space " ' < > [ ] { | }
Encoding %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.