Template:HD/url: Difference between revisions

Safer nicotine wiki Tobacco Harm Reduction
Jump to navigation Jump to search
m 1 revision imported
imported>Jonesey95
use standard doc
 
Line 9: Line 9:
The link button [[File:OOjs UI icon link-ltr.svg]] on the enhanced editing toolbar will encode a link.
The link button [[File:OOjs UI icon link-ltr.svg]] on the enhanced editing toolbar will encode a link.


The URL must start with a supported [[URI scheme]]. <code>http://</code> and <code>https://</code> are always supported. <code>gopher://</code>, <code>irc://</code>, <code>ircs://</code>, <code>ftp://</code>, <code>news://</code> and <code>mailto:</code> will create a link and an icon but require an agent registered in the browser.<!--- TemplateHD/url --->
The URL must start with a supported [[URI scheme]]. <code>http://</code> and <code>https://</code> are always supported. <code>gopher://</code>, <code>irc://</code>, <code>ircs://</code>, <code>ftp://</code>, <code>news://</code> and <code>mailto:</code> will create a link and an icon but require an agent registered in the browser.<!--- TemplateHD/url ---><noinclude>
{{documentation|content={{Template:HD/doc}}}}
</noinclude>

Latest revision as of 17:00, 17 May 2022

URLs containing certain characters will display and link incorrectly unless those characters are encoded. For example, a space must be replaced by %20.

sp " ' , ; < > ? [ ]
%20 %22 %27 %2c %3b %3c %3e %3f %5b %5d
Single apostrophes do not need to be encoded; multiples will be parsed as italic or bold markup

The link button on the enhanced editing toolbar will encode a link.

The URL must start with a supported URI scheme. http:// and https:// are always supported. gopher://, irc://, ircs://, ftp://, news:// and mailto: will create a link and an icon but require an agent registered in the browser.