问题
How do I escape a pipe character using a MediaWiki parser function?
Replacing a backslash by a hyphen can be like this:
{{#vardefine:varName|test\test\test}}
{{#vardefine:varName2|{{#replace:{{#var:varName}}|\|-}}}}
{{#var:varName2}}
But replacing a pipe character ...?
回答1:
Use the built-in magic word {{!}}
instead of litteral pipes.
来源:https://stackoverflow.com/questions/62773762/how-escape-pipe-charachter-in-mediawiki-parser-function