Template:URL2/doc

This is a fork of Template:URL for use in infoboxes.

It behaves similarly to URL with the following exceptions:
 * By default it does not display anything if the parameters are blank or omitted. Template:URL displays undefined by default.
 * It implements a parameter msg that turns on or off the message undefined. Setting msg to false or anything beginning with n or N will suppress the message. Anything else enables the message.
 * It strips html tags and wiki-link markup from the supplied url parameter.
 * It truncates the url parameter at the first space it finds.
 * It can take its own output as input, allowing website parameters to be wrapped in in the design of an infobox, without causing problems if editors add   in an article.

Different from Template:URL
If there is no input, the default behavior of URL2 is to display nothing (use msg to display the instructional message):

URL2 handles formatting commonly found in the website parameter of an infobox:

Same as Template:URL
The template wraps the output in (see ) and adds &lt;wbr/&gt; before displayed periods:

The use of http://, https://, a protocol-relative URL, or a different protocol is preserved in the URL but is not shown in the link text:

If the path is only a slash it is not displayed in the link text:

The template also adds &lt;wbr/&gt; before any displayed slashes in the path:

For a URL containing an equal sign, use 1:

Microformat
The template wraps the displayed URL with  so that it is included in any parent microformat which takes a URL parameter - see WikiProject Microformats.