Ticket #28282: 28282.patch
| File 28282.patch, 1.1 KB (added by , 12 years ago) |
|---|
-
src/wp-includes/js/tinymce/plugins/wordpress/plugin.js
348 348 } 349 349 350 350 // Keep empty paragraphs :( 351 e.content = e.content.replace( /<p>( <br ?\/?>|\u00a0|\uFEFF)?<\/p>/g, '<p> </p>' );351 e.content = e.content.replace( /<p>(?:<br ?\/?>|\ufeff|\s)+?<\/p>/g, '<p> </p>' ); 352 352 353 353 if ( editor.getParam( 'wpautop', true ) && typeof window.switchEditors !== 'undefined' ) { 354 354 e.content = window.switchEditors.pre_wpautop( e.content ); 355 355 } 356 356 }); 357 357 358 // Remove spaces from empty paragraphs. 359 editor.on( 'BeforeSetContent', function( event ) { 360 event.content = event.content.replace( /<p>(?: |\ufeff|\s)+<\/p>/gi, '<p></p>' ); 361 }); 362 358 363 editor.on( 'preInit', function() { 359 364 // Don't replace <i> with <em> and <b> with <strong> and don't remove them when empty 360 365 editor.schema.addValidElements( '@[id|accesskey|class|dir|lang|style|tabindex|title|contenteditable|draggable|dropzone|hidden|spellcheck|translate],i,b' );
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)