WordPress.org

Make WordPress Core

Changeset 42178


Ignore:
Timestamp:
11/14/17 05:27:06 (7 days ago)
Author:
westonruter
Message:

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 for 4.9.

Location:
branches/4.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.9

  • branches/4.9/src/wp-admin/js/editor.js

    r42176 r42178  
    10381038            text = text.replace( /\r\n|\r/g, '\n' ); 
    10391039 
    1040             if ( text.indexOf( '\n' ) === -1 ) { 
    1041                 return text; 
    1042             } 
    1043  
    10441040            // Remove line breaks from <object>. 
    10451041            if ( text.indexOf( '<object' ) !== -1 ) { 
Note: See TracChangeset for help on using the changeset viewer.