Editor: Cease adding paragraphs when switching editor tabs.

Fixes an error since [41783] in which extra paragraphs could be added to content when switching editor tabs.

Props pento, adamsilverstein, aduth.
Fixes #42531.



git-svn-id: https://develop.svn.wordpress.org/trunk@42177 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Wilson 2017-11-14 05:23:55 +00:00
parent 7dfdbf2754
commit ca40a244d7
1 changed files with 0 additions and 4 deletions

View File

@ -1037,10 +1037,6 @@ window.wp = window.wp || {};
// Normalize line breaks.
text = text.replace( /\r\n|\r/g, '\n' );
if ( text.indexOf( '\n' ) === -1 ) {
return text;
}
// Remove line breaks from <object>.
if ( text.indexOf( '<object' ) !== -1 ) {
text = text.replace( /<object[\s\S]+?<\/object>/g, function( a ) {