Opened 11 years ago

Closed 10 years ago

#193 closed Bug (wontfix)

Hyperlink incorrect when pasting in Firefox

Reported by: anonymous Owned by: Martin Kou
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 (1)

designMode.html (657 bytes) - added by Martin Kou 10 years ago.
Mozilla Midas bug test case with document.open() and document.close().

Download all attachments as: .zip

Change History (10)

comment:1 Changed 11 years ago by Frederico Caldeira Knabben

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

comment:2 Changed 11 years ago by Frederico Caldeira Knabben

May be related to bug #1507157.


Moved from SF. Original poster: anonymous

comment:3 Changed 11 years ago by Frederico Caldeira Knabben

Keywords: Confirmed added
Milestone: FCKeditor 2.6
Reporter: changed from Frederico Caldeira Knabben to anonymous
Version: FCKeditor 2.4.2

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.

comment:4 Changed 10 years ago by Martin Kou

Owner: set to Martin Kou
Status: newassigned

comment:5 Changed 10 years ago by Martin Kou

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.

comment:6 Changed 10 years ago by Martin Kou

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.

comment:7 Changed 10 years ago by Martin Kou

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 10 years ago by Martin Kou

Attachment: designMode.html added

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

comment:8 Changed 10 years ago by Martin Kou

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.

comment:9 Changed 10 years ago by Frederico Caldeira Knabben

Resolution: wontfix
Status: assignedclosed
Note: See TracTickets for help on using tickets.
© 2003 – 2017 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy