在模板维基标记中的表格中,是否有可能保留非标准字符“|”,并将其作为URL的一部分而不进行转义?
{| class="wikitable"
|-
! Test in Table
|-
| [http://example.org/{var1}|{var2}|{var3} Example]
|}
在表格单元格中应该呈现出类似这样的东西。
[http://example.org/1|2|3 Example]
并链接到
http://example.org/1|2|3
保留垂直条并不像这样编码
http://example.org/1%7C2%7C3
第三方网站要求在URL中包含«|»,我希望在服务器端修复URL处理,但目前这不在我的掌控范围内。有没有任何解决方法?
我尝试了以下方法:
[http://example.org/1|2|3 Example] doesn't work within a table
[http://example.org/{var1}|{var2}|{var3} Example] works in tables
但是,这两种方式都创建了有效的标准URL,其中垂直条被正确地编码为%7C,就像上面一样,我希望避免这种情况。
|
在模板代码中运行正常,%7C
在模板参数中也运行正常。 - svick[http://example.org/1{{!}}2{{!}}3 Example]
这样,而不是[http://example.org/1|2|3 Example]
,并且仍然可以在表格内正常工作。 - skalee