Ticket #7070: 7070_3.patch
File 7070_3.patch, 1.3 KB (added by , 13 years ago) |
---|
-
_source/core/dom/walker.js
430 430 }; 431 431 432 432 var tailNbspRegex = /^[\t\r\n ]*(?: |\xa0)$/, 433 is NotWhitespaces = CKEDITOR.dom.walker.whitespaces( 1),434 is NotBookmark = CKEDITOR.dom.walker.bookmark( 0, 1),435 fillerEvaluator = function( element)433 isWhitespaces = CKEDITOR.dom.walker.whitespaces(), 434 isBookmark = CKEDITOR.dom.walker.bookmark(), 435 toSkip = function( node ) 436 436 { 437 return isNotBookmark( element ) && isNotWhitespaces( element ); 437 return isBookmark( node ) 438 || isWhitespaces( node ) 439 || node.type == CKEDITOR.NODE_ELEMENT && node.getName() in CKEDITOR.dtd.$removeEmpty; 438 440 }; 439 441 440 442 // Check if there's a filler node at the end of an element, and return it. 441 443 CKEDITOR.dom.element.prototype.getBogus = function() 442 444 { 443 var tail = this.getLast( fillerEvaluator ); 445 // Bogus are not always at the block end, e.g. <p><strong>text<br /></strong></p> (#7070). 446 var tail = this; 447 do { tail = tail.getPreviousSourceNode(); } 448 while ( toSkip( tail ) ) 449 444 450 if ( tail && ( !CKEDITOR.env.ie ? tail.is && tail.is( 'br' ) 445 451 : tail.getText && tailNbspRegex.test( tail.getText() ) ) ) 446 452 {