Wikipedia模板参数中的等号无法正确显示 [英] Equals signs in Wikipedia template parameters won't display properly
问题描述
我注意到,在链接中使用等号的链接似乎无法正常工作(当链接放置在{{missing information}}
模板内部时).有什么方法可以解决此限制,以便在MediaWiki模板中可以包含等号的链接?
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.]}}
推荐答案
这是因为MediaWiki将其视为名称为[https://www.google.com/search?q
的参数(该值是=
之后的其余字符串参数).您可以使用编号参数:
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.
这篇关于Wikipedia模板参数中的等号无法正确显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!