Ticket #6984: 6984.patch
File 6984.patch, 1.9 KB (added by , 13 years ago) |
---|
-
_source/core/htmlparser/fragment.js
108 108 } 109 109 } 110 110 111 function sendPendingBRs( brsToIgnore)111 function sendPendingBRs() 112 112 { 113 while ( pendingBRs.length - ( brsToIgnore || 0 ) > 0)113 while ( pendingBRs.length ) 114 114 currentNode.add( pendingBRs.shift() ); 115 115 } 116 116 -
_source/plugins/wysiwygarea/plugin.js
313 313 var win = editor.window, 314 314 doc = editor.document, 315 315 body = editor.document.getBody(), 316 bodyFirstChild = body.getFirst(), 316 317 bodyChildsNum = body.getChildren().count(); 317 318 318 if ( !bodyChildsNum || ( bodyChildsNum == 1&& body.getFirst().hasAttribute( '_moz_editor_bogus_node' ) ) ) 319 if ( !bodyChildsNum 320 || bodyChildsNum == 1 321 && bodyFirstChild.type == CKEDITOR.NODE_ELEMENT 322 && bodyFirstChild.hasAttribute( '_moz_editor_bogus_node' ) ) 319 323 { 320 324 restoreDirty( editor ); 321 325 … … 981 985 '</html>'; 982 986 } 983 987 988 // Distinguish bogus to normal BR at the end of document for Mozilla. (#5293). 989 if ( CKEDITOR.env.gecko ) 990 data = data.replace( /<br \/>(?=\s*<\/(:?html|body)>)/, '$&<br type="_moz" />' ); 991 984 992 data += activationScript; 985 993 986 994 … … 1000 1008 ? doc.getDocumentElement().getOuterHtml() 1001 1009 : doc.getBody().getHtml(); 1002 1010 1011 // BR at the end of document is bogus node for Mozilla. (#5293). 1012 if ( CKEDITOR.env.gecko ) 1013 data = data.replace( /<br>(?=\s*(:?$|<\/body>))/, '' ); 1014 1003 1015 if ( editor.dataProcessor ) 1004 1016 data = editor.dataProcessor.toDataFormat( data, fixForBody ); 1005 1017