Opened 17 years ago

Closed 17 years ago

#4577 closed Bug (fixed)

link dialog breaks relative urls like href="foo"

Reported by: JasonWoof Owned by: Garry Yao
Priority: Normal Milestone: CKEditor 3.1
Component: UI : Dialogs Version: SVN (CKEditor) - OLD
Keywords: Confirmed Review+ Cc:

Description

when you use the link dialog on a link like href="foo" then click OK (without changing anything) the link changes to: href="​http://foo"

This corrupts the page.

I solved this by changing the default protocol to "other". If you want to keep ​http:// as the default, you'll need to update the code that populates the link dialog, so if there's a href with a value, but no protocol, it sets the "protocol" dropdown to "other".

You can reproduce this bug by:

1) go to ​http://ckeditor.com/demo

2) select a word, click the link icon

3) set the protocol to "other" and the url to "foo"

4) click OK.

5) hit "source" and see that the href="foo"

6) click source again to go back to the normal view

7) click your link, and hit the "link" button again.

8) See that the "protocol" dropdown is now set to "​http://" (which is incorrect)

9) without changing anything, click "OK"

10) click the "source" button, and see that your link now has: href="​http://foo" (which is incorrect)

Attachments (1)

4577.patch​ (517 bytes) - added by Garry Yao 17 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 17 years ago by Garry Yao

Keywords: Confirmed added
Milestone: → CKEditor 3.1
Priority: High → Normal

Changed 17 years ago by Garry Yao

Attachment: 4577.patch​ added

comment:2 Changed 17 years ago by Garry Yao

Component: General → UI : Dialogs
Keywords: Review? added
Owner: set to Garry Yao
Status: new → assigned
Version: 3.0.1 → SVN (CKEditor)

comment:3 Changed 17 years ago by Frederico Caldeira Knabben

Keywords: Review+ added; Review? removed

comment:4 Changed 17 years ago by Garry Yao

Resolution: → fixed
Status: assigned → closed

Fixed with [4494].

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy