X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fcore%2Fhtmlparser%2Felement.js;h=b66fcfa6f1ea399cd05107d16eb7a70ac6dfd8e3;hb=9afde8772159bd3436f1f5b7862960307710ae5a;hp=2e9a9c3f95282f7ef7904458eeb085e8556f4ccc;hpb=941b0a9ba4e673e292510d80a5a86806994b8ea6;p=ckeditor.git diff --git a/_source/core/htmlparser/element.js b/_source/core/htmlparser/element.js index 2e9a9c3..b66fcfa 100644 --- a/_source/core/htmlparser/element.js +++ b/_source/core/htmlparser/element.js @@ -34,7 +34,7 @@ CKEDITOR.htmlParser.element = function( name, attributes ) */ this.children = []; - var tagName = attributes._cke_real_element_type || name; + var tagName = attributes[ 'data-cke-real-element-type' ] || name; var dtd = CKEDITOR.dtd, isBlockLike = !!( dtd.$nonBodyContent[ tagName ] || dtd.$block[ tagName ] || dtd.$listItem[ tagName ] || dtd.$tableContent[ tagName ] || dtd.$nonEditable[ tagName ] || tagName == 'br' ), @@ -114,7 +114,7 @@ CKEDITOR.htmlParser.element = function( name, attributes ) */ element.filterChildren = function() { - if( !isChildrenFiltered ) + if ( !isChildrenFiltered ) { var writer = new CKEDITOR.htmlParser.basicWriter(); CKEDITOR.htmlParser.fragment.prototype.writeChildrenHtml.call( element, writer, filter ); @@ -171,13 +171,13 @@ CKEDITOR.htmlParser.element = function( name, attributes ) var attribsArray = []; // Iterate over the attributes twice since filters may alter // other attributes. - for( var i = 0 ; i < 2; i++ ) + for ( var i = 0 ; i < 2; i++ ) { for ( a in attributes ) { newAttrName = a; value = attributes[ a ]; - if( i == 1 ) + if ( i == 1 ) attribsArray.push( [ a, value ] ); else if ( filter ) { @@ -188,7 +188,7 @@ CKEDITOR.htmlParser.element = function( name, attributes ) delete attributes[ a ]; break; } - else if( newAttrName != a ) + else if ( newAttrName != a ) { delete attributes[ a ]; a = newAttrName; @@ -197,9 +197,9 @@ CKEDITOR.htmlParser.element = function( name, attributes ) else break; } - if( newAttrName ) + if ( newAttrName ) { - if( ( value = filter.onAttribute( element, newAttrName, value ) ) === false ) + if ( ( value = filter.onAttribute( element, newAttrName, value ) ) === false ) delete attributes[ newAttrName ]; else attributes [ newAttrName ] = value;