Ticket #5668: 5668_2.patch
File 5668_2.patch, 2.0 KB (added by , 14 years ago) |
---|
-
editor/_source/classes/fckdataprocessor.js
101 101 { 102 102 var data = FCKXHtml.GetXHTML( rootNode, !excludeRoot, format ) ; 103 103 104 if ( ignoreIfEmptyParagraph && FCKRegexLib.EmptyOutParagraph.test( data ) ) 105 return '' ; 106 104 if ( ignoreIfEmptyParagraph ) 105 data = data.replace( FCKRegexLib.EmptyOutParagraph, '' ); 107 106 return data ; 108 107 }, 109 108 -
editor/_source/internals/fckxhtml.js
147 147 148 148 FCKXHtml._AppendChildNodes = function( xmlNode, htmlNode, isBlockElement ) 149 149 { 150 var oNode = htmlNode.firstChild ;151 152 while ( oNode)150 // To defense any possibly IE DOM (due to invalid HTML), where the sibling references are 151 // unreliable, the safest way is to to traverse through child nodes. 152 for ( var i = 0, oNode, length = htmlNode.childNodes.length; i < length; i++ ) 153 153 { 154 oNode = htmlNode.childNodes[ i ]; 154 155 this._AppendNode( xmlNode, oNode ) ; 155 oNode = oNode.nextSibling ;156 156 } 157 157 158 158 // Trim block elements. This is also needed to avoid Firefox leaving extra -
editor/_source/internals/fckregexlib.js
63 63 // Empty elements may be <p></p> or even a simple opening <p> (see #211). 64 64 EmptyParagraph : /^<(p|div|address|h\d|center)(?=[ >])[^>]*>\s*(<\/\1>)?$/ , 65 65 66 EmptyOutParagraph : / ^<(p|div|address|h\d|center)(?=[ >])[^>]*>(?:\s*| | )(<\/\1>)?$/ ,66 EmptyOutParagraph : /<(p|div|address|h\d|center)(?=[ >])[^>]*>(?:\s*| | )(<\/\1>)?$/ , 67 67 68 68 TagBody : /></ , 69 69