Opened 7 years ago

Closed 6 years ago

#7894 closed Bug (fixed)

Pasting links in IE8 and IE9 no longer working as expected

Reported by: Teresa Monahan Owned by: Garry Yao
Priority: Normal Milestone: CKEditor 3.6.2
Component: Core : Parser Version: 3.5.3
Keywords: IBM Cc: Damian, Satya Minnekanti, James Cunningham

Description

When pasting links into CKEditor, IE automaticcaly detects the links and converts them into anchor tags. Although the HTML IE generates for this is mal-formed, this used to work quite well in CKEditor. However from 3.5.3 onwards there is a change in this behaviour and extra links are now generated for the pasted content in IE8 and IE9.

To see an example of this, paste the following content (which was generated by IE) into the source view of CKEditor in 3.5.2 and then in 3.5.3. Then switch back to wysiwyg editor and see that the first word on line 2 has been incorrectly converted to a link in the 3.5.3 version.

<P>line 1 <A href="http://www.ibm.comline"><a href="http://www.ibm.com">http://www.ibm.com</a></P>
<P>line</A> 2 <A href="http://ckeditor.com"><a href="http://ckeditor.com">http://ckeditor.com</a></A></P>

We realise that this is essentially a browser issue since the HTML generated is not valid. However we would be interested to know why there is a difference in behaviour between the 2 CKEditor versions. Was there a code change in this area to address another issue? Also, do you think there is any way we could potentially work around this browser limitation for CKEditor 3.5.3 onwards? Any thoughts or comments you have on this would be greatly appreciated.

Attachments (3)

7894_TC.patch (750 bytes) - added by Garry Yao 6 years ago.
7894.patch (1.2 KB) - added by Garry Yao 6 years ago.
7894_2.patch (1.6 KB) - added by Garry Yao 6 years ago.

Download all attachments as: .zip

Change History (15)

comment:1 Changed 7 years ago by Jakub Ś

Status: newconfirmed

"line 2" has been converted in to link in Opera, IE8 and IE9 from CKEditor 3.5.3 rev [6561]

Changed 6 years ago by Garry Yao

Attachment: 7894_TC.patch added

Changed 6 years ago by Garry Yao

Attachment: 7894.patch added

comment:2 Changed 6 years ago by Garry Yao

Owner: set to Garry Yao
Status: confirmedreview

Link (with href attribute) is to be removed when empty.

comment:3 Changed 6 years ago by Garry Yao

Component: GeneralCore : Parser

comment:4 Changed 6 years ago by Frederico Caldeira Knabben

Keywords: NeedsTest added

We need a ticket test branch here.

comment:5 in reply to:  4 ; Changed 6 years ago by Garry Yao

Keywords: NeedsTest removed

Replying to fredck:

We need a ticket test branch here.

Already had one there, but on that branch a dt was forked instead of a tt.

comment:6 Changed 6 years ago by Frederico Caldeira Knabben

Good to know... enough to point to the test file:
http://ckeditor.t/dt/core/htmlparser/fragment.html

comment:7 in reply to:  5 Changed 6 years ago by Frederico Caldeira Knabben

Status: reviewreview_failed

Replying to garry.yao:

Already had one there, but on that branch a dt was forked instead of a tt.

That is proving to be a problem. While the patch fixes the dt test, it makes no difference for the issue reported here.

A tt is definitely needed.

Changed 6 years ago by Garry Yao

Attachment: 7894_2.patch added

comment:8 Changed 6 years ago by Garry Yao

Status: review_failedreview

comment:10 Changed 6 years ago by Frederico Caldeira Knabben

Status: reviewreview_passed

The following test was failing after patch and has been fixed on the ticket branch:
http://ckeditor.t/tt/4614/1.html

comment:11 Changed 6 years ago by Frederico Caldeira Knabben

Milestone: CKEditor 3.6.2

comment:12 Changed 6 years ago by Garry Yao

Resolution: fixed
Status: review_passedclosed

Fixed with [7223].

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