Show
Ignore:
Timestamp:
2007-10-16 04:36:44 (2 years ago)
Author:
martinkou
Message:

Fixed #1414 : Fixed the issue where entity codes inside <pre> blocks are incorrectly unescaped when switching to Source mode.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • FCKeditor/branches/versions/2.5.x/editor/_source/internals/fckxhtml.js

    r986 r1026  
    383383                        var val = item.nodeValue ; 
    384384                        if ( item.nodeType == 3 && i == 0 ) 
    385                                 node.appendChild( FCKXHtml.XML.createTextNode( FCKXHtml._AppendSpecialItem( '\r\n' + val ) ) ) ; 
     385                        { 
     386                                // We shouldn't put the plain text value of the text node directly into HTML. (See #1414) 
     387                                var dummyNode = document.createElement( 'pre' ) ; 
     388                                dummyNode.appendChild( document.createTextNode( val ) ) ; 
     389                                node.appendChild( FCKXHtml.XML.createTextNode( FCKXHtml._AppendSpecialItem( '\r\n' + dummyNode.innerHTML ) ) ) ; 
     390                        } 
    386391                        else 
    387392                                FCKXHtml._AppendNode( node, item ) ;