Thread:Extension talk:Scribunto/Passing a URL as a parameter/reply (2)

The URL is not being preprocessed into a link before being passed to Scribunto.

Due to the layout of your #invoke and your use of an unnamed parameter for the URL, the URL is coming in as the Lua string. That trailing linebreak is screwing up the wikitext you're trying to return, as the bracketed external link syntax must be all on one line for MediaWiki to parse it as such. The simplest fix would be to change your template to pass the URL as, since with named parameters the whitespace is automatically trimmed by MediaWiki.