Someday this post could save you an hour: do you need to insert raw HTML code in MediaWiki (for example, an internal image that links to an external website)? Configure it to use $wgRawHtml (its page says that it is safe to use it only if your site is not publicly editable).
I can’t say this often enough: use MediaWiki if and only if you need a website that is a small clone of Wikipedia: if you need something that is just slightly different, use DokuWiki!
Update (2011-10-31) it seems that $wgRawHtml is in LocalSettings.php – see the comments below. :)

I know, Mediawiki is so much like a wikipedia. It does ot have a very good GUI but still it sustains because it is a developer’s platform.
However, you can install a couple of extension to display code as a formatted text inmedia wiki.
I know I could use an extension but it’s easier using DokuWiki. Thanks.
thanks for this post
it’s very useful
But where shall we put $wgRawHtml ?
Please update the post, cause it did not save an hour for me.. and for others probably too
This is a 2008 post but it seems still valid and with a 30 seconds Google search I found the place for $wgRawHtml or a good candidate, though: LocalSettings.php
Use grep, find and google before posting. :)
It would have taken you 30 seconds to update your article and would save mankind many 30 seconds google searches… ;-)
With my previous comment, I saved 30*N seconds for sure. :)