Skip to content
Permalink
Browse files

Merge branch 't/11660'

  • Loading branch information...
Reinmar committed Mar 13, 2014
2 parents 1b9a322 + 62e95ec commit 5cd42b71bc267bb2331e3e93578ac732c5969ec6
Showing with 14 additions and 1 deletion.
  1. +1 −0 CHANGES.md
  2. +13 −1 core/htmlparser/fragment.js
@@ -12,6 +12,7 @@ Fixed Issues:
* [#11603](http://dev.ckeditor.com/ticket/11603): Fixed: [Tableresize](http://ckeditor.com/addon/tableresize) attaches to tables outside of editable.
* [#9205](http://dev.ckeditor.com/ticket/9205), [#7805](http://dev.ckeditor.com/ticket/7805), [#8216](http://dev.ckeditor.com/ticket/8216): Fixed: `{cke_protected_1}` appearing in data in various cases where HTML comments are placed next to `"` or `'`.
* [#11635](http://dev.ckeditor.com/ticket/11635): Fixed: Some attributes are not protected before content is passed through fix bin.
* [#11660](http://dev.ckeditor.com/ticket/11660): [IE] Fixed: Content of a table is lost when there is some extra markup inside a table.


## CKEditor 4.3.3
@@ -44,6 +44,18 @@ CKEDITOR.htmlParser.fragment = function() {
// Dtd of the fragment element, basically it accept anything except for intermediate structure, e.g. orphan <li>.
var rootDtd = CKEDITOR.tools.extend( {}, { html: 1 }, CKEDITOR.dtd.html, CKEDITOR.dtd.body, CKEDITOR.dtd.head, { style: 1, script: 1 } );

// Which element to create when encountered not allowed content.
var structureFixes = {
ul: 'li',
ol: 'li',
dl: 'dd',
table: 'tbody',
tbody: 'tr',
thead: 'tr',
tfoot: 'tr',
tr: 'td'
};

function isRemoveEmpty( node ) {
// Keep marked element event if it is empty.
if ( node.attributes[ 'data-cke-survive' ] )
@@ -396,7 +408,7 @@ CKEDITOR.htmlParser.fragment = function() {

// Fix orphan text in list/table. (#8540) (#8870)
if ( !inTextarea && !currentDtd[ '#' ] && currentName in nonBreakingBlocks ) {
parser.onTagOpen( currentName in listBlocks ? 'li' : currentName == 'dl' ? 'dd' : currentName == 'table' ? 'tr' : currentName == 'tr' ? 'td' : '' );
parser.onTagOpen( structureFixes[ currentName ] || '' );
parser.onText( text );
return;
}

0 comments on commit 5cd42b7

Please sign in to comment.
You can’t perform that action at this time.