Redactor adding extra paragraph and br tag when entering and exiting HTML source mode
This appears to be an issue with Redactor itself. Their example allowing you to edit the source code of a field has the same bug.