I hacked a bit and found the trouble.
Starting at line 658 (in the dev version)…
if ( this.o.wpuiautop ) {
$this.find('p, br')
.not( this.o.content + ' > br, ' + this.o.content + '.wp-tab-content > p' )
.filter(function() {
return( $.trim( $(this).html() ) === '' );
}).remove();
}
This seems to find and remove all empty paragraph tags, which is good, since there are always a few strays. But it also removes all break tags! I believe, by their nature, they are always “empty” or “=== ””, so this doesn’t seem like a correct behavior to employ.
My solution was to only find and remove empty paragraphs…
if ( this.o.wpuiautop ) {
$this.find('p')
.filter(function() {
return( $.trim( $(this).html() ) === '' );
}).remove();
}
(I also removed the “.not” clause as I couldn’t see that it actually did anything, but I may not have tested enough.)
This has fixed my issue of break tags being removed from Accordion content.