wp_editor returning invalid html

Turns out that the output from wp_editor is safe to save to a database. It needs passing through stripslashes() before echoing into HTML.