Jump to content

Template talk:Unlink

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Spaces break output

[edit]

I am unsure at which point the # and ; get a newline prepended to it, but currently any link with spaces in them get parsed wrong. Compare

Is this intended behaviour? I also think that the documentation could do with something like {{Unlink|[[Albert Einstein]]}} instead. --BryghtShadow (talk) 09:41, 6 December 2011 (UTC)[reply]

I added this serious limitation to the documentation.--Patrick (talk) 10:19, 6 December 2011 (UTC)[reply]
Observation: It's caused by escaped spaces ( ) being passed on through to the next level.
  • {{unlink/1|Main Page}} gives... Main Page
  • {{unlink/1|[Main Page]}} gives... Main Page
  • {{unlink/1|[[Main Page]]}} gives... [Main Page] (produced by {{unlink|[[[Main Page]]]}}, thus should never exist outside of demonstration purposes.)
A fix is something like: {{#replace:{{{1}}}|&#32;|<nowiki></nowiki> <nowiki></nowiki>}}. Although it may make templates more expensive. --BryghtShadow (talk) 17:55, 6 December 2011 (UTC)[reply]