You're right. I tried <pre> at the beginning, but there is this ridiculous requirement of dealing by hand with & and other stuff in HTML that I went with other tags before carefully reading the note. There is also an old <xmp> tag, treating everything in it as-is, but it's not universally supported.
Having Markdown as a third option for format would be really nice in such cases. The only problem is indentation that is tiring unless you have a vi/xclip+sed/etc. close. The solution is a fenced code blocks (~~~) extension, available in many implementations.