When editing a page I found that if I pasted html including </textarea> into the code box and pressed Save, the code wasn't correctly escaped with htmlspecialchars() and the textarea was closed early, and my html spilled into the page edit form.
I can't remember the exact circumstances (whether I pressed save or save and publish, wether first time save only etc). I don't have internet access where I'm working at the moment, but I will return and test more rigourosly.