Ticket #3744: 3744.patch

File 3744.patch, 1.8 KB (added by Frederico Caldeira Knabben, 15 years ago)
  • _source/core/htmlparser/fragment.js

     
    283283                                if ( candidate == currentNode )
    284284                                        currentNode = currentNode.parent;
    285285                        }
    286                         else if ( pendingInline.length > index )
     286
     287                        // Check if there is any pending tag to be closed.
     288                        for ( ; index < pendingInline.length ; index++ )
    287289                        {
    288                                 // If we didn't find any parent to be closed, let's check the
    289                                 // pending list.
    290                                 for ( ; index < pendingInline.length ; index++ )
     290                                // If found, just remove it from the list.
     291                                if ( tagName == pendingInline[ index ].name )
    291292                                {
    292                                         // If found, just remove it from the list.
    293                                         if ( tagName == pendingInline[ index ].name )
    294                                         {
    295                                                 pendingInline.splice( index, 1 );
     293                                        pendingInline.splice( index, 1 );
    296294
    297                                                 // Decrease the index so we continue from the next one.
    298                                                 index--;
    299                                         }
     295                                        // Decrease the index so we continue from the next one.
     296                                        index--;
    300297                                }
    301298                        }
    302299                };
  • _source/tests/core/htmlparser/fragment.html

     
    163163                                                '<p><br />text</p>' );
    164164                },
    165165
    166 
    167166                test_ticket_3585_2 : function()
    168167                {
    169168                        testParser(     '<b>inline </b>\n<p>paragraph\t\r\n</p>\t\r\n',
    170169                                                '<p><b>inline </b></p><p>paragraph</p>' );
    171170                },
    172171
     172                test_ticket_3744 : function()
     173                {
     174                        testParser(     '<div><b><font><span>A</font></span></b></div><div>X</div>',
     175                                                '<div><b><font><span>A</span></font></b></div><div>X</div>' );
     176                },
     177
    173178                name : document.title
    174179        };
    175180})() );
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy