Anything that looks like HTML will be interpreted as such by the Wiki software.
As such, if you wish to paste code (for example between opening and closing <pre>
tags),
then you must preformat it.
A simple way to do this at the command line is as follows, with $file replaced by the file you wish to format.
sed 's/\&/\&/g' $file | sed 's/</\</g' | sed 's/>/\>/g'
This first replaces ampersands with &
, and then replaces the less-than and greater-than characters with the appropriate ampersand-denoted equivalents.
You can then copy the output of the command and paste it on a Wiki page.