Changeset 6646
- Timestamp:
- 04/06/11 15:27:14 (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
CKEditor/trunk/_source/core/htmlparser/fragment.js
r6629 r6646 185 185 } 186 186 187 parser.onTagOpen = function( tagName, attributes, selfClosing )187 parser.onTagOpen = function( tagName, attributes, selfClosing, optionalClose ) 188 188 { 189 189 var element = new CKEDITOR.htmlParser.element( tagName, attributes ); … … 194 194 element.isEmpty = true; 195 195 196 element.isOptionalClose = optionalClose; 197 196 198 // This is a tag to be removed if empty, so do not add it immediately. 197 199 if ( CKEDITOR.dtd.$removeEmpty[ tagName ] ) … … 225 227 if ( !element.isUnknown && !currentNode.isUnknown && !currentDtd[ tagName ] ) 226 228 { 229 // Current node doesn't have a close tag, time for a close 230 // as this element isn't fit in. (#7497) 231 if ( currentNode.isOptionalClose ) 232 parser.onTagClose( currentName ); 227 233 // Fixing malformed nested lists by moving it into a previous list item. (#3828) 228 if ( tagName in listBlocks234 else if ( tagName in listBlocks 229 235 && currentName in listBlocks ) 230 236 { … … 236 242 addElement( ( lastChild = new CKEDITOR.htmlParser.element( 'li' ) ), currentNode ); 237 243 244 !element.returnPoint && ( element.returnPoint = currentNode ); 238 245 currentNode = lastChild; 239 246 } 240 247 // Establish new list root for orphan list items. 241 248 else if ( tagName in CKEDITOR.dtd.$listItem && currentName != tagName ) 242 parser.onTagOpen( tagName == 'li' ? 'ul' : 'dl', {} );249 parser.onTagOpen( tagName == 'li' ? 'ul' : 'dl', {}, 0, 1 ); 243 250 // We're inside a structural block like table and list, AND the incoming element 244 251 // is not of the same type (e.g. <td>td1<td>td2</td>), we simply add this new one before it, … … 370 377 && CKEDITOR.tools.trim( text ) ) 371 378 { 372 this.onTagOpen( fixForBody, {} );379 this.onTagOpen( fixForBody, {}, 0, 1 ); 373 380 } 374 381
Note: See TracChangeset
for help on using the changeset viewer.
