Ticket #4656: 4656.patch

File 4656.patch, 1.4 KB (added by Garry Yao, 14 years ago)
  • _source/core/htmlparser/element.js

     
    3535        this.children = [];
    3636
    3737        var dtd                 = CKEDITOR.dtd,
    38                 isBlockLike     = !!( dtd.$block[ name ] || dtd.$listItem[ name ] || dtd.$tableContent[ name ] || dtd.$nonEditable ),
     38                isBlockLike     = !!( dtd.$block[ name ] || dtd.$listItem[ name ] || dtd.$tableContent[ name ] || dtd.$nonEditable[ name ] ),
    3939                isEmpty         = !!dtd.$empty[ name ];
    4040
    4141        this.isEmpty    = isEmpty;
  • _test/dt/core/htmlparser/htmlparser.html

     
    6969                                htmlParse( getTextAreaValue( 'htmlOriginal3' ) ),
    7070                                'Attributes doesn\'t match.' );
    7171                },
    72                
     72
     73                // Test white-spaces inside inline elements are well preserved, while
     74                // white-spaces before block-level elements are trimmed. (#4656)
     75                test_trim_whitespaces : function()
     76                {
     77                        assert.areSame( '<div>some <strong>bold</strong> text<p>paragraph</p></div>',
     78                                htmlParse( '<div>some <strong>bold</strong> text <p>\nparagraph</p></div>' ),
     79                                'White-spaces doesn\'t match.' );
     80                },
     81
    7382                name :document.title
    7483        };
    7584} )() );
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy