X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fcore%2Fhtmlparser%2Ffragment.js;fp=_source%2Fcore%2Fhtmlparser%2Ffragment.js;h=d31b0508d787e00a331a59cf5c6e9f0214da45a1;hb=055b6b0792ce7dc53d47af606b367c04b927c2ab;hp=244e298320d63278cf09f939e704dd5a376b74ce;hpb=66f4ae0bf0280ed56bf7c0f4ab175424dd1d47a0;p=ckeditor.git diff --git a/_source/core/htmlparser/fragment.js b/_source/core/htmlparser/fragment.js index 244e298..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() ); } @@ -392,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 )