Changes

Jump to navigation Jump to search
Created page with "{{Template shortcut|flr}} {{Documentation subpage}} <!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata (see Wikipedia:Wikidata) -->..."
{{Template shortcut|flr}}
{{Documentation subpage}}
<!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{Lua|Module:Format link|Module:Urldecode}}

== Usage ==
This template does exactly what {{tl|format link}} does, and takes all the same arguments.

This template is intended to lower editor workload when copying links from the URL bar and is not suitable for replacing {{tl|format link}}, because of the changes it makes to {{tl|format link}}'s output that could create ambiguity if automatically replaced.

This template replaces any underscores with spaces and decodes any [[URL encoding|URL parts]] in {{tl|format link}}'s output. Some examples of why this may be useful—

=== {{tl|format link}} ===
* <code><nowiki>{{format link|People_of_the_Philippines_v._Santos,_Ressa_and_Rappler#Santos_Jr.'s_article|italicizepage=y}}</nowiki></code>
*: {{format link|People_of_the_Philippines_v._Santos,_Ressa_and_Rappler#Santos_Jr.'s_article|italicizepage=y}}
* <code><nowiki>{{format link|%E6%9C%AA%E6%9D%A5%E6%97%A5%E8%A8%98#M%61nga}}</nowiki></code>
*: {{format link|%E6%9C%AA%E6%9D%A5%E6%97%A5%E8%A8%98#M%61nga}}

=== {{tl|format linkr}} ===
* <code><nowiki>{{format linkr|People_of_the_Philippines_v._Santos,_Ressa_and_Rappler#Santos_Jr.'s_article|italicizepage=y}}</nowiki></code>
: {{format linkr|People_of_the_Philippines_v._Santos,_Ressa_and_Rappler#Santos_Jr.'s_article|italicizepage=y}}
* <code><nowiki>{{format linkr|%E6%9C%AA%E6%9D%A5%E6%97%A5%E8%A8%98#M%61nga}}</nowiki></code>
: {{format linkr|%E6%9C%AA%E6%9D%A5%E6%97%A5%E8%A8%98#M%61nga}}
* As shown in these examples, {{tl|format linkr}} also creates a way to use curly braces in links, which requires multiple templates with {{tl|format link}}:
** <code><nowiki>{{hlist|{{format linkr|T#%7D}}|{{format linkr|#%7D}}}}</nowiki></code>
*: {{hlist|{{format linkr|T#%7B%7Bu%7D%7D}}|{{format linkr|#%7B%7Bu%7D%7D}}}}
** <code><nowiki>{{hlist|{{format linkr|Template talk:T#%7B%7Bu%7D%7D}}|{{format linkr|#%7B%7Bu%7D%7D}}}}</nowiki></code>
*: {{hlist|{{format linkr|Template talk:T#%7B%7Bu%7D%7D}}|{{format linkr|#%7B%7Bu%7D%7D}}}}

==== {{para|nud}} ====
{{para|nud}} ('''n'''o '''U'''RL '''d'''ecode) can be added to disable URL decoding but still get underscores replaced.
* <code><nowiki>{{format linkr|%E6%9C%AA%E6%9D%A5%E6%97%A5%E8%A8%98#M%61_nga|nud=y}}</nowiki></code>
: {{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]] <code>&amp;UnderBar;</code> just as well:
* <code><nowiki>{{format linkr|pages%5Fcan&rsquo;t_contain_underscores#but%5Fsections&amp;UnderBar;may (though their anchors won&rsquo;t!)}}</nowiki></code>
: {{format linkr|pages%5Fcan&rsquo;t_contain_underscores#but%5Fsections&UnderBar;may (though their anchors won&rsquo;t!)}}

<includeonly>{{sandbox other||
<!-- Categories below this line; interwikis at Wikidata -->
[[Category:Internal link templates]]
}}</includeonly>

Navigation menu