Ticket #6975: 6975.patch

File 6975.patch, 1.7 KB (added by Garry Yao, 13 years ago)
  • _source/core/dtd.js

     
    142142                 */
    143143                $tableContent : {caption:1,col:1,colgroup:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1},
    144144
     145                /** List of elements that have optional close tag */
     146                $optionalClose : CKEDITOR.env.ie && CKEDITOR.env.version < 8 ? { dd : 1, dt :1 } : {},
     147
    145148        html: U,
    146149        head: T,
    147150        style: N,
  • _source/core/htmlparser/fragment.js

     
    193193                        if ( element.isUnknown && selfClosing )
    194194                                element.isEmpty = true;
    195195
    196                         element.isOptionalClose = optionalClose;
     196                        // Check for optional closed elements, e.g. browser quirks (#6975) and manually opened blocks.
     197                        element.isOptionalClose = tagName in CKEDITOR.dtd.$optionalClose || optionalClose;
    197198
    198199                        // This is a tag to be removed if empty, so do not add it immediately.
    199200                        if ( CKEDITOR.dtd.$removeEmpty[ tagName ] )
     
    246247                                        }
    247248                                        // Establish new list root for orphan list items.
    248249                                        else if ( tagName in CKEDITOR.dtd.$listItem && currentName != tagName )
     250                                        {
    249251                                                parser.onTagOpen( tagName == 'li' ? 'ul' : 'dl', {}, 0, 1 );
     252                                        }
    250253                                        // We're inside a structural block like table and list, AND the incoming element
    251254                                        // is not of the same type (e.g. <td>td1<td>td2</td>), we simply add this new one before it,
    252255                                        // and most importantly, return back to here once this element is added,
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy