Page MenuHomePhabricator

make our mediawiki's CodeSelect compatible with |
Closed, ResolvedPublic

Description

CodeSelect (T93) is causing issues.

{F27}

When using | inside the wiki markup, it will not show up in the generated wiki html.

Wiki usage working:

{{CodeSelect|code=
text here
}}

Wiki usage broken:

{{CodeSelect|code=
text here | pipe will be lost
}}

Perhaps while we are at it we can remove the need for |code=, somehow make | work. Or use another character to escape if that is possible? Or escape | somehow?

Wiki markup source:

Details

Impact
Normal

Event Timeline

Replacing the | with {{!}} will render a | as expected. {{!}} is a "magic word" to Mediawiki, and it converts it to a pipe character.

For example:

{{CodeSelect|code=
text here {{!}} pipe will be saved
}}
Patrick assigned this task to fortasse.

Great! Updated the wiki and documented here:

https://www.whonix.org/wiki/Dev/mediawiki#CodeSelect_with_pipes