Fill empty TinyMCE paragraphs with a dummy <br /> on all browsers.

fixes #33151
props iseulde
Built from https://develop.svn.wordpress.org/trunk@33461


git-svn-id: http://core.svn.wordpress.org/trunk@33428 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Mark Jaquith 2015-07-28 14:12:25 +00:00
parent fd320b5c6e
commit 0e28880a17
4 changed files with 6 additions and 7 deletions

View File

@ -92,8 +92,7 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
// Replace Read More/Next Page tags with images
editor.on( 'BeforeSetContent', function( event ) {
var title,
paragraph = tinymce.Env.webkit ? '<p><br /></p>' : '<p></p>';
var title;
if ( event.content ) {
if ( event.content.indexOf( '<!--more' ) !== -1 ) {
@ -113,12 +112,12 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
'title="' + title + '" data-mce-resize="false" data-mce-placeholder="1" />' );
}
// Remove spaces from empty paragraphs.
event.content = event.content.replace( /<p>(?:&nbsp;|\u00a0|\uFEFF|\s)+<\/p>/gi, paragraph );
if ( event.load && event.format !== 'raw' && hasWpautop ) {
event.content = wp.editor.autop( event.content );
}
// Remove spaces from empty paragraphs.
event.content = event.content.replace( /<p>(?:&nbsp;|\u00a0|\uFEFF|\s)+<\/p>/gi, '<p><br /></p>' );
}
});

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.3-beta4-33460';
$wp_version = '4.3-beta4-33461';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.