[Wikia-l] Character entities in wikitext

John Beckett johnb.beckett at gmail.com
Wed May 21 10:18:02 UTC 2008


I'm looking for guidance on using html character entities in wikitext.

Example:
- I want the user to see "<CR>".
- The correct html would be "&lt;CR&gt;".
- But using "<CR>" in the wikitext works (MediaWiki generates "&lt;CR&gt;" in the
html).

On the Vim Tips wiki (Vim is a programmer's text editor), we love weird symbols. The
wikitext on a typical page (for example http://vim.wikia.com/wiki/VimTip1) can be
really hard to work with because it's full of "&lt;" etc. Many of our pages use
"&lt;" for "<", "&gt;" for ">" and "&amp;" for "&" because that's the "right thing
to do".

However, I can't find any relevant documentation on wikitext, and lately, we've been
favouring expediency and have used "<" and ">" and "&" in wikitext (for example
http://vim.wikia.com/wiki/VimTip1548).

I have seen some tragic consequences. If we use "<S-F1>" (Shift+F1 key), we get
strike through like <s>...</s>. Also "<q-args>" renders as curly quotes. In both
cases, the "-" and what follows is omitted. If someone can point me to the MediaWiki
source responsible, I'd like to browse it so I can see what else might cause
trouble.

What should I do? I'd like to have simple wikitext and use "<", ">", "&" (it makes
quite a bit of difference to editors, and we need a lot of editing). I think we
could tolerate the manual patching we'd have to do to fix occasional breakages like
"<S-F1>".

Before I convert 1000 pages by removing character entities, I'd appreciate advice on
how to handle this.

John




More information about the Wikia-l mailing list