Page MenuHomePhabricator

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

Description

CodeSelect (T93) is causing issues.

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

Patrick created this task.Jan 20 2017, 7:41 AM
fortasse added a comment.EditedFeb 23 2017, 5:12 AM

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.Feb 23 2017, 5:03 PM
Patrick closed this task as Resolved.

Great! Updated the wiki and documented here:

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