X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=_source%2Fcore%2Fhtmlparser%2Ffragment.js;h=f69f7cdca5a42b1ea0b63a5b353e5ca20a81f35b;hb=refs%2Ftags%2Fv3.6.2;hp=f94f4e917d242c61b6e99e942495f852abae6868;hpb=48b1db88210b4160dce439c6e3e32e14af8c106b;p=ckeditor.git diff --git a/_source/core/htmlparser/fragment.js b/_source/core/htmlparser/fragment.js index f94f4e9..f69f7cd 100644 --- a/_source/core/htmlparser/fragment.js +++ b/_source/core/htmlparser/fragment.js @@ -37,38 +37,47 @@ CKEDITOR.htmlParser.fragment = function() (function() { - // Elements which the end tag is marked as optional in the HTML 4.01 DTD - // (expect empty elements). - var optionalClose = {colgroup:1,dd:1,dt:1,li:1,option:1,p:1,td:1,tfoot:1,th:1,thead:1,tr:1}; - // Block-level elements whose internal structure should be respected during // parser fixing. - var nonBreakingBlocks = CKEDITOR.tools.extend( - {table:1,ul:1,ol:1,dl:1}, - CKEDITOR.dtd.table, CKEDITOR.dtd.ul, CKEDITOR.dtd.ol, CKEDITOR.dtd.dl ), - listBlocks = CKEDITOR.dtd.$list, listItems = CKEDITOR.dtd.$listItem; + var nonBreakingBlocks = CKEDITOR.tools.extend( { table:1,ul:1,ol:1,dl:1 }, CKEDITOR.dtd.table, CKEDITOR.dtd.ul, CKEDITOR.dtd.ol, CKEDITOR.dtd.dl ); + + // IE < 8 don't output the close tag on definition list items. (#6975) + var optionalCloseTags = CKEDITOR.env.ie && CKEDITOR.env.version < 8 ? { dd : 1, dt :1 } : {}; + + var listBlocks = { ol:1, ul:1 }; + + // Dtd of the fragment element, basically it accept anything except for intermediate structure, e.g. orphan