Ticket #2368 (closed Bug: fixed)

Opened 5 months ago

Last modified 5 months ago

IE: Protected source for comments is broken

Reported by: fredck Owned by: martinkou
Priority: Normal Milestone: FCKeditor 2.6.3
Component: General Version: SVN
Keywords: Confirmed IE Review+ Cc: Scott

Description

The fix for #2263 is breaking source protection in IE SVN nightly.

To replicate:

  1. Click source.
  2. Add <!-- test --> to the source.
  3. Press Source again to revert to design mode.
  4. Press Source again, and you have a "null" cannot be null.

Attachments

2368.patch (1.5 KB) - added by martinkou 5 months ago.
2368_2.patch (1.6 KB) - added by martinkou 5 months ago.

Change History

Changed 5 months ago by fredck

The following is a proposal fix for the part of the code that is throwing the error:

But then, there are still other things to get fixed to make it work.

Changed 5 months ago by fredck

Sorry, Trac didn't like my inline diff... here you have it: http://pastebin.com/f637ed2bf

Changed 5 months ago by martinkou

  • owner set to martinkou
  • status changed from new to assigned

Changed 5 months ago by martinkou

Ok... apart from the weird IE bug in which you can't put a bare comment inside a node and expect it to appear in the DOM... there's also the issue that FCKeditor puts protected code as plain text into FCKTempBin, and those plain text should never be converted to DOM nodes at all.

Proposing a patch to fix both issues.

Changed 5 months ago by martinkou

Changed 5 months ago by martinkou

  • keywords Review? added

Changed 5 months ago by fredck

  • keywords Review- added; Review? removed

The proposed patch is ok. In my previously proposed patch I got also the chance with this fix to use removeChild to retrieve the final element so we release the reference to the temporary node. Couldn't it be used here too? (basically node.firstChild.removeChild( node.firstChild.lastChild ) at line 1118)

Changed 5 months ago by martinkou

Changed 5 months ago by martinkou

  • keywords Review? added; Review- removed

Changed 5 months ago by fredck

  • keywords Review+ added; Review? removed

Changed 5 months ago by martinkou

  • status changed from assigned to closed
  • resolution set to fixed

Fixed with [2258].

Click here for more info about our SVN system.

Note: See TracTickets for help on using tickets.