mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-22 16:21:26 +01:00
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:
parent
fd320b5c6e
commit
0e28880a17
@ -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>(?: |\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>(?: |\u00a0|\uFEFF|\s)+<\/p>/gi, '<p><br /></p>' );
|
||||
}
|
||||
});
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
Binary file not shown.
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user