I had a problem where WordPress (or TinyMCE) adds an unwanted
linebreak after a <label> tag in a form I put into a page, using the HTML tab of the editor. To remove them, i could use CSS or JQuery, but instead i used PHP in a quick filter for my functions.php file:
# REMOVE BAD BR TAGS FROM SIGN-UP FORMS
add_filter('the_content', 'remove_bad_br_tags');
function remove_bad_br_tags($content) {
$content = str_ireplace("<label><br />", "<label>", $content);
return $content;
}
I saw this issue come up a few times in the forums, but those topics were all closed to new replies, so i wanted to share this here in case it helps someone.