Thread:Extension talk:Secure HTML/Weird behavior with version 2.1/reply

I haven't been able to replicate your problem exactly, but I did find that in certain cases, parts of the raw HTML were being interpreted as wiki text. It might be related. Try the latest version (2.2.1), which has a fix for this.