Ticket #7894: 7894.patch
File 7894.patch, 1.2 KB (added by , 13 years ago) |
---|
-
_source/core/htmlparser/fragment.js
49 49 // Dtd of the fragment element, basically it accept anything except for intermediate structure, e.g. orphan <li>. 50 50 var rootDtd = CKEDITOR.tools.extend( {}, { html: 1 }, CKEDITOR.dtd.html, CKEDITOR.dtd.body, CKEDITOR.dtd.head, { style:1,script:1 } ); 51 51 52 function isRemoveEmpty( node ) 53 { 54 // Empty link is to be removed when empty but not anchor. (#7894) 55 return node.name == 'a' && node.attributes.href 56 || CKEDITOR.dtd.$removeEmpty[ node.name ]; 57 } 58 52 59 /** 53 60 * Creates a {@link CKEDITOR.htmlParser.fragment} from an HTML string. 54 61 * @param {String} fragmentHtml The HTML to be parsed, filling the fragment. … … 200 207 element.isOptionalClose = tagName in optionalCloseTags || optionalClose; 201 208 202 209 // This is a tag to be removed if empty, so do not add it immediately. 203 if ( CKEDITOR.dtd.$removeEmpty[ tagName ])210 if ( isRemoveEmpty( element ) ) 204 211 { 205 212 pendingInline.push( element ); 206 213 return;