So, we could use something like WordPress `wpautop` to avoid bugs with other HTML elements.

Check out their function here, https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/formatting.php#L231