Equals signs in Wikipedia template parameters won't display properly
Asked Answered
L

2

4

I've noticed that using links with equals signs in them doesn't seem to work properly (when the link is placed inside the {{missing information}} template). Is there any way to work around this limitation so that links with equals signs can be included inside MediaWiki templates?

{{missing information|[https://www.google.com/search?q=google+search+test This link has an equals sign in it, and the template is not displaying properly.]}}

{{missing information|[https://www.google.com/ This link has no equals sign in it, and it's working properly.]}}

Lower answered 5/2, 2013 at 1:16 Comment(1)
It appears that some template don't work properly when one of their parameters contains an equals sign, and I'm still looking for a workaround.Lower
T
8

This is because MediaWiki treats this as a parameter with the name [https://www.google.com/search?q (the value is the rest of the string parameter after =). You can work around that by using a numbered parameter:

{{missing information|1=[https://www.google.com/search?q=google+search+test This link has an equals sign in it, and the template is not displaying properly.]}}

Things get more complicated if you have more parameters and only some of them are problematic, I'm not sure how does that work. But using numbered parameters for everything should work.

Trying answered 5/2, 2013 at 6:59 Comment(1)
There's no way to disable the numbered parameters?Marielamariele
I
0

You can use Template:=, which according to its documentation 'allows "=" to be used in unnamed template parameters', where it would otherwise be treated as the key/value separator. For example, this works:

{{missing information|[https://www.google.com/search?q{{=}}cool Cool!]}}

Inconsistent answered 31/3, 2020 at 18:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.