Changeset 168

Show
Ignore:
Timestamp:
2007-02-28 16:53:21 (3 years ago)
Author:
fredck
Message:

Fixed #90 : The previous implementation of the "extra <br>" cleanup (related to  http://tinyurl.com/34e892) was buggy. This change should fix it.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • FCKeditor/trunk/editor/_source/internals/fckxhtml.js

    r167 r168  
    125125{ 
    126126        // Trim block elements. This is also needed to avoid Firefox leaving extra 
    127         // BRs at the end of them (check made inside _AppendNode). 
     127        // BRs at the end of them. 
    128128        if ( isBlockElement ) 
    129                 FCKDomTools.TrimNode( htmlNode ) ; 
     129                FCKDomTools.TrimNode( htmlNode, true ) ; 
    130130 
    131131        var iCount = 0 ; 
     
    209209                                return false ; 
    210210 
    211                         // Remove the <br> if it is a bogus node or is the last child. 
    212                         if ( sNodeName == 'br' && ( htmlNode.getAttribute( 'type', 2 ) == '_moz' || !htmlNode.nextSibling ) ) 
     211                        // Remove the <br> if it is a bogus node. 
     212                        if ( sNodeName == 'br' && htmlNode.getAttribute( 'type', 2 ) == '_moz' ) 
    213213                                return false ; 
    214214