Ticket #3671: 3671_3.patch
File 3671_3.patch, 1.6 KB (added by , 15 years ago) |
---|
-
_source/core/htmlparser/fragment.js
104 104 105 105 // If the target is the fragment and this element can't go inside 106 106 // body (if fixForBody). 107 if ( fixForBody && !target.type && !CKEDITOR.dtd.$body[ element.name ])107 if ( fixForBody && !target.type ) 108 108 { 109 var savedCurrent = currentNode; 109 var elementName, realElement; 110 if ( element.attributes 111 && ( realElement = element.attributes._cke_realelement ) 112 && ( realElement = new CKEDITOR.htmlParser.fragment.fromHtml( decodeURIComponent( realElement ) ) ) 113 && ( realElement = realElement.children[ 0 ] ) ) 114 elementName = realElement.name; 115 else 116 elementName = element.name; 117 if ( !( elementName in CKEDITOR.dtd.$body ) ) 118 { 119 var savedCurrent = currentNode; 110 120 111 // Create a <p> in the fragment.112 currentNode = target;113 parser.onTagOpen( fixForBody, {} );121 // Create a <p> in the fragment. 122 currentNode = target; 123 parser.onTagOpen( fixForBody, {} ); 114 124 115 // The new target now is the <p>.116 target = currentNode;125 // The new target now is the <p>. 126 target = currentNode; 117 127 118 if ( enforceCurrent ) 119 currentNode = savedCurrent; 120 } 128 if ( enforceCurrent ) 129 currentNode = savedCurrent; 130 } 131 } 121 132 122 133 // Rtrim empty spaces on block end boundary. (#3585) 123 134 if ( element._.isBlockLike