Changeset 194

Show
Ignore:
Timestamp:
2007-03-06 14:45:48 (3 years ago)
Author:
fredck
Message:

Fixed #202 : HR tags will not anymore break the contests loaded in the editor.

Location:
FCKeditor/trunk
Files:
3 modified

Legend:

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

    r147 r194  
    197197        return e ; 
    198198} 
     199 
     200// HR Processor. 
     201// This is a IE only (tricky) thing. We protect all HR tags before loading them 
     202// (see FCK.ProtectTags). Here we put the HRs back. 
     203if ( FCKBrowserInfo.IsIE ) 
     204{ 
     205        FCKDocumentProcessor.AppendNew().ProcessDocument = function( document ) 
     206        { 
     207                var aHRs = document.getElementsByTagName( 'HR' ) ; 
     208 
     209                var eHR ; 
     210                var i = aHRs.length - 1 ; 
     211                while ( i >= 0 && ( eHR = aHRs[i--] ) ) 
     212                { 
     213                        // Create the replacement HR. 
     214                        var newHR = document.createElement( 'hr' ) ; 
     215                        newHR.mergeAttributes( eHR, true ) ; 
     216                         
     217                        // We must insert the new one after it. insertBefore will not work in all cases. 
     218                        FCKDomTools.InsertAfterNode( eHR, newHR ) ; 
     219 
     220                        eHR.parentNode.removeChild( eHR ) ; 
     221                } 
     222        } 
     223} 
  • FCKeditor/trunk/editor/_source/internals/fck.js

    r193 r194  
    294294                // IE doesn't support <abbr> and it breaks it. Let's protect it. 
    295295                if ( FCKBrowserInfo.IsIE ) 
    296                         sTags += '|ABBR' ; 
     296                        sTags += '|ABBR|HR' ; 
    297297 
    298298                var oRegex = new RegExp( '<(' + sTags + ')(?!\w|:)', 'gi' ) ; 
  • FCKeditor/trunk/_whatsnew.html

    r191 r194  
    9393                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/112">#112</a>] The enter 
    9494                        key now behaves correctly on lists with Firefox, when the EnterMode is set to 'br'.</li> 
    95                 <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/112">#152</a>] Invalid 
     95                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/152">#152</a>] Invalid 
    9696                        self-closing tags are now being fixed before loading. </li> 
    9797                <li>A few tags were being ignored to the check for required contents (not getting stripped 
    9898                        out, as expected). Fixed.</li> 
     99                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/202">#202</a>] The HR 
     100                        tag will not anymore break the contents loaded in the editor.</li> 
    99101        </ul> 
    100102        <h3>