X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fcore%2Fhtmlparser%2Ffragment.js;h=d31b0508d787e00a331a59cf5c6e9f0214da45a1;hb=055b6b0792ce7dc53d47af606b367c04b927c2ab;hp=ad1c93edb2211aafad75bb83bb5f0d51a3b403cd;hpb=c6e377a02b54abc07129d72b632763c727476a15;p=ckeditor.git diff --git a/_source/core/htmlparser/fragment.js b/_source/core/htmlparser/fragment.js index ad1c93e..d31b050 100644 --- a/_source/core/htmlparser/fragment.js +++ b/_source/core/htmlparser/fragment.js @@ -108,9 +108,9 @@ CKEDITOR.htmlParser.fragment = function() } } - function sendPendingBRs() + function sendPendingBRs( brsToIgnore ) { - while ( pendingBRs.length ) + while ( pendingBRs.length - ( brsToIgnore || 0 ) > 0 ) currentNode.add( pendingBRs.shift() ); } @@ -274,6 +274,7 @@ CKEDITOR.htmlParser.fragment = function() } checkPending( tagName ); + sendPendingBRs(); element.parent = currentNode; element.returnPoint = returnPoint; @@ -391,7 +392,8 @@ CKEDITOR.htmlParser.fragment = function() // Parse it. parser.parse( fragmentHtml ); - sendPendingBRs(); + // Send all pending BRs except one, which we consider a unwanted bogus. (#5293) + sendPendingBRs( !CKEDITOR.env.ie && 1 ); // Close all pending nodes. while ( currentNode.type )