Ticket #193 (closed Bug: wontfix)

Opened 3 years ago

Last modified 2 years ago

Hyperlink incorrect when pasting in Firefox

Reported by: anonymous Owned by: martinkou
Priority: Normal Milestone: FCKeditor 2.6
Component: General Version: FCKeditor 2.4.2
Keywords: SF Firefox Confirmed CantFix Cc:

Description

When a hyperlink is pointing to the same site as the page in which FCKeditor is embedded, and it is pasted into the editor using ctrl-v, the url gets mangled.

For example:

  1. Go to  http://www.fckeditor.net/demo in Firefox.
  2. Open Word or OpenOffice and create a hyperlink pointing to " http://www.fckeditor.net/demo" (or anything else on the  http://www.fckeditor.net site).
  3. Copy this hyperlink and paste it into the editor.
  4. Now, click the source button. The url will have changed to "../../../../demo".

This doesn't happen when using the "Paste from Word" feature, which may be why it doesn't happen in IE. However, in the version of FCKeditor I have (2.2), it will happen in Firefox even if using "Paste from Word," but it still doesn't happen in IE.


Moved from SF:
 http://sourceforge.net/tracker/index.php?func=detail&aid=1570832&group_id=75348&atid=543653

Attachments

designMode.html Download (0.6 KB) - added by martinkou 2 years ago.
Mozilla Midas bug test case with document.open() and document.close().

Change History

Changed 3 years ago by fredck

Sadly, this bug has caused FCKeditor to be unusable for my organization. We were using it on our site for certain users who send out emails to subscribers; but since they invariably need to include links to our site, and we can't rely on them understanding and using a workaround, I've had to remove FCKeditor altogether.


Moved from SF. Original poster: anonymous

Changed 3 years ago by fredck

May be related to bug # 1507157.


Moved from SF. Original poster: anonymous

Changed 3 years ago by fredck

  • keywords Confirmed added
  • reporter changed from fredck to anonymous
  • version set to FCKeditor 2.4.2
  • milestone set to FCKeditor 2.6

Confirmed with FF2. Ok with IE6.

It happens only when pasting directly, with CTRL+V. I believe it is quite hard to fix, because of the security restrictions enforced by FF. We should "protect" the URLs before pasting.

I'm targeting it to 2.6 for investigation.

Changed 2 years ago by martinkou

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

Changed 2 years ago by martinkou

Even the Paste from Word dialog is not working now, unfortunately.

The  rich text editing demo from Mozilla Midas works perfectly under the same situation, however. So something in FCKeditor must be causing this.

Changed 2 years ago by martinkou

The lines 127 to 134 in trunk/editor/_source/classes/fckeditingarea.js seems to have triggered some Gecko bug to cause this. Commenting out the few lines would make the bug disappear. On the other hand, the few lines there loads the style sheets into the editing area so we can't just solve the bug by commenting it out.

Changed 2 years ago by martinkou

I'm certain this is a Gecko bug now and I've found how FCKeditor has triggered it. It turns out running document.open() and document.close() on the editing frame document would cause all subsequent links pasted into the frame to be converted to relative paths automatically whenever possible.

I've written a simple test case for it. The issue should be reported to the Mozilla developers in addition to trying to find a workaround in FCKeditor.

Changed 2 years ago by martinkou

Mozilla Midas bug test case with document.open() and document.close().

Changed 2 years ago by martinkou

  • keywords CantFix added

I've reported the issue to Mozilla at  https://bugzilla.mozilla.org/show_bug.cgi?id=417199.

I've considered a workaround for some time but it seems it's not feasible. With the current design, the code found to be triggering the bug cannot be replaced easily with DOM operations or innerHTML modifications without any side effects. So I'm marking this as a CantFix.

Changed 2 years ago by fredck

  • status changed from assigned to closed
  • resolution set to wontfix
Note: See TracTickets for help on using tickets.