[Mediawiki-l] character replacement/search URL template
Jonathan Elsas
jelsas at email.unc.edu
Thu Jan 27 20:07:29 UTC 2005
Hi -- I'd like to create a template something like:
[http://www.google.com/search?q={{{1}}} {{{1}}}]
so that a link is created, linking to a search for that word (or
phrase). this works great when the term is a single word, but when it
a phrase I'm getting behavior like this:
in the article, I have
{{search|one two}}
and it is rendered
<a href='http://www.google.com/search?q=one' class='external'
title="http://www.google.com/search?q=one">one two one</a>
so, the text that shows up in the link is "two one two". I'd like the
text to be "one two" and the search string parameter in the URL to be
"one+two". Is there a way to replace a space with a '+' in a template
parameter?
thanks,
Jon
More information about the MediaWiki-l
mailing list