Changeset 5103
- Timestamp:
- 02/12/10 13:15:22 (3 years ago)
- Location:
- CKEditor/trunk
- Files:
-
- 2 edited
-
CHANGES.html (modified) (1 diff)
-
_source/core/htmlparser/fragment.js (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
CKEditor/trunk/CHANGES.html
r5102 r5103 89 89 <li><a href="http://dev.fckeditor.net/ticket/4893">#4893</a> : Editor should understand table cell inline styles.</li> 90 90 <li><a href="http://dev.fckeditor.net/ticket/4611">#4611</a> : Selection around <select> in editor doesn't anymore cause error.</li> 91 <li><a href="http://dev.fckeditor.net/ticket/4886">#4886</a> : Extra BR tags where being created in the output HTML.</li> 91 92 <li>Updated the following language files:<ul> 92 93 <li><a href="http://dev.fckeditor.net/ticket/5006">#5006</a> : Dutch;</li> -
CKEditor/trunk/_source/core/htmlparser/fragment.js
r4858 r5103 65 65 fragment = new CKEDITOR.htmlParser.fragment(), 66 66 pendingInline = [], 67 pendingBRs = [], 67 68 currentNode = fragment, 68 69 // Indicate we're inside a <pre> element, spaces should be touched differently. … … 72 73 function checkPending( newTagName ) 73 74 { 75 var pendingBRsSent; 76 74 77 if ( pendingInline.length > 0 ) 75 78 { … … 83 86 if ( ( !currentDtd || currentDtd[ pendingName ] ) && ( !newTagName || !pendingDtd || pendingDtd[ newTagName ] || !CKEDITOR.dtd[ newTagName ] ) ) 84 87 { 88 if ( !pendingBRsSent ) 89 { 90 sendPendingBRs(); 91 pendingBRsSent = 1; 92 } 93 85 94 // Get a clone for the pending element. 86 95 pendingElement = pendingElement.clone(); … … 98 107 } 99 108 } 109 } 110 111 function sendPendingBRs() 112 { 113 while ( pendingBRs.length ) 114 currentNode.add( pendingBRs.shift() ); 100 115 } 101 116 … … 182 197 } 183 198 199 if ( tagName == 'br' ) 200 { 201 pendingBRs.push( element ); 202 return; 203 } 204 184 205 var currentName = currentNode.name; 185 206 … … 309 330 currentNode = candidate; 310 331 311 if ( currentNode.name == 'pre' )332 if ( currentNode.name == 'pre' ) 312 333 inPre = false; 334 335 if ( candidate._.isBlockLike ) 336 sendPendingBRs(); 313 337 314 338 addElement( candidate, candidate.parent ); … … 322 346 } 323 347 324 if ( tagName == 'body' )348 if ( tagName == 'body' ) 325 349 fixForBody = false; 326 350 }; … … 337 361 } 338 362 363 sendPendingBRs(); 339 364 checkPending(); 340 365 … … 366 391 // Parse it. 367 392 parser.parse( fragmentHtml ); 393 394 sendPendingBRs(); 368 395 369 396 // Close all pending nodes.
Note: See TracChangeset
for help on using the changeset viewer.
