Ticket #3933: 3933.patch
File 3933.patch, 1.4 KB (added by , 14 years ago) |
---|
-
_source/plugins/wysiwygarea/plugin.js
212 212 if ( lastNode && lastNode.getName && ( lastNode.getName() in nonExitableElementNames ) ) 213 213 { 214 214 restoreDirty( editor ); 215 var paddingBlock = editor.document.createElement( 216 ( CKEDITOR.env.ie && enterMode != CKEDITOR.ENTER_BR ) ? 217 '<br _cke_bogus="true" />' : 'br' ); 215 var paddingBlock = CKEDITOR.dom.element.createFromHtml( '<br _cke_bogus="true" />' ); 218 216 body.append( paddingBlock ); 219 217 } 220 218 } … … 634 632 editor.on( 'insertElement', onInsertElement, null, null, 20 ); 635 633 // Auto fixing on some document structure weakness to enhance usabilities. (#3190 and #3189) 636 634 editor.on( 'selectionChange', onSelectionChangeFixBody, null, null, 1 ); 635 // Clean up those bogus elements introduced by it on output (#3933). 636 var dataProcessor = editor.dataProcessor, 637 htmlFilter = dataProcessor && dataProcessor.htmlFilter; 638 639 htmlFilter && htmlFilter.addRules( 640 { 641 elements : 642 { 643 'br' : function( element ) 644 { 645 if( element.attributes[ '_cke_bogus' ] ) 646 return false; 647 } 648 } 649 }, 5 ); 637 650 }); 638 651 } 639 652 });