JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.3.2
[ckeditor.git] / _source / core / htmlparser / fragment.js
index 244e298..d31b050 100644 (file)
@@ -108,9 +108,9 @@ CKEDITOR.htmlParser.fragment = function()
                        }\r
                }\r
 \r
-               function sendPendingBRs()\r
+               function sendPendingBRs( brsToIgnore )\r
                {\r
-                       while ( pendingBRs.length )\r
+                       while ( pendingBRs.length - ( brsToIgnore || 0 ) > 0 )\r
                                currentNode.add( pendingBRs.shift() );\r
                }\r
 \r
@@ -392,7 +392,8 @@ CKEDITOR.htmlParser.fragment = function()
                // Parse it.\r
                parser.parse( fragmentHtml );\r
 \r
-               sendPendingBRs();\r
+               // Send all pending BRs except one, which we consider a unwanted bogus. (#5293)\r
+               sendPendingBRs( !CKEDITOR.env.ie && 1 );\r
 \r
                // Close all pending nodes.\r
                while ( currentNode.type )\r