Just a note, you may want to add the remove_filter/add_filter stuff for wpautop.

In the example above, this is located in the first few lines of the do_blocks function. In the blocks.php core file that houses the do_blocks function, this is located at the bottom before the return statement.

You might get some random tags thrown into your output without it.