Template:Format Linkr
This template is intended to lower editor workload when copying links from the URL bar and is not suitable for replacing {{format link}}, because of the changes it makes to {{format link}}'s output that could create ambiguity if automatically replaced.
This template replaces any underscores with spaces and decodes any URL parts in {{format link}}'s output. Some examples of why this may be useful—
{{format link}}
{{format link|People_of_the_Philippines_v._Santos,_Ressa_and_Rappler#Santos_Jr.'s_article|italicizepage=y}}
{{format link|%E6%9C%AA%E6%9D%A5%E6%97%A5%E8%A8%98#M%61nga}}
{{format linkr}}
{{format linkr|People_of_the_Philippines_v._Santos,_Ressa_and_Rappler#Santos_Jr.'s_article|italicizepage=y}}
{{format linkr|%E6%9C%AA%E6%9D%A5%E6%97%A5%E8%A8%98#M%61nga}}
- As shown in these examples, {{format linkr}} also creates a way to use curly braces in links, which requires multiple templates with {{format link}}:
{{hlist|{{format linkr|Template talk:T#%7B%7Bu%7D%7D}}|{{format linkr|#%7B%7Bu%7D%7D}}}}
|nud=
|nud=
(no URL decode) can be added to disable URL decoding but still get underscores replaced.
{{format linkr|%E6%9C%AA%E6%9D%A5%E6%97%A5%E8%A8%98#M%61_nga|nud=y}}
Note that you can achieve this through the HTML5 entity _
just as well:
{{format linkr|pages%5Fcan’t_contain_underscores#but%5Fsections_may (though their anchors won’t!)}}
TemplateData
This template simplifies the process of formatting links from the URL bar by automatically replacing underscores with spaces and decoding URL-encoded parts.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Page | 1 | The name of the page the link points to. It can include a section after a hashtag (#). | String | required |
Italicize page | italicizepage | Set to 'y' to italicize the page name.
| String | optional |
No URL Decode | nud | Set to 'y' to prevent URL decoding, while still replacing underscores with spaces.
| String | optional |