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.


Built from https://develop.svn.wordpress.org/trunk@42177


git-svn-id: http://core.svn.wordpress.org/trunk@42007 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Peter Wilson 2017-11-14 05:24:47 +00:00
parent 5dab6b6e61
commit fc0f64e1ef
3 changed files with 2 additions and 6 deletions

View File

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

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.0-alpha-42175'; $wp_version = '5.0-alpha-42177';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.