Index: _source/plugins/wysiwygarea/plugin.js
===================================================================
--- _source/plugins/wysiwygarea/plugin.js (revision 4371)
+++ _source/plugins/wysiwygarea/plugin.js Fri Nov 06 17:13:30 CST 2009
@@ -212,9 +212,7 @@
if ( lastNode && lastNode.getName && ( lastNode.getName() in nonExitableElementNames ) )
{
restoreDirty( editor );
- var paddingBlock = editor.document.createElement(
- ( CKEDITOR.env.ie && enterMode != CKEDITOR.ENTER_BR ) ?
- '
' : 'br' );
+ var paddingBlock = CKEDITOR.dom.element.createFromHtml( '
' );
body.append( paddingBlock );
}
}
@@ -634,6 +632,21 @@
editor.on( 'insertElement', onInsertElement, null, null, 20 );
// Auto fixing on some document structure weakness to enhance usabilities. (#3190 and #3189)
editor.on( 'selectionChange', onSelectionChangeFixBody, null, null, 1 );
+ // Clean up those bogus elements introduced by it on output (#3933).
+ var dataProcessor = editor.dataProcessor,
+ htmlFilter = dataProcessor && dataProcessor.htmlFilter;
+
+ htmlFilter && htmlFilter.addRules(
+ {
+ elements :
+ {
+ 'br' : function( element )
+ {
+ if( element.attributes[ '_cke_bogus' ] )
+ return false;
+ }
+ }
+ }, 5 );
});
}
});