Template:Truncate-link

From CPU Graveyard - Dieshots

Description

If there is a long url, it displays a shortened url with the link. If the url is over 60 chars, it will display the first 27 chars concated with '...' concated with the last 27 chars.

Usage

  • {{truncate-link|LINKURL}}

Note

this has a bug.

[https://commons.wikimedia.org/w/index.php?title=Special:ListFiles/Antoinebercovici https://commons.wikimedia.o...

    ListFiles/Antoinebercovici]
  • the problem is that mediawiki is picking up some key words instead of text and generates html
[<a rel="nofollow" class="external free" href="https://commons.wikimedia.org/w/index.php?title=Special:ListFiles/Antoinebercovici">https://commons.wikimedia.org/w/index.php?title=Special:ListFiles/Antoinebercovici</a>  <a rel="nofollow" class="external free" href="https://commons.wikimedia.o">https://commons.wikimedia.o</a>...
<dl><dd>ListFiles/Antoinebercovici]</dd></dl>