Ticket #5855 (closed Bug: fixed)

Opened 4 years ago

Last modified 3 years ago

Inserting link using Browser creates incorrect links

Reported by: fringley Owned by: alfonsoml
Priority: Normal Milestone: CKEditor 3.5.1
Component: General Version: 3.1
Keywords: Cc: cksource@…

Description

See http://cksource.com/forums/viewtopic.php?f=11&t=19136

Using version 3.3.1 (but has been a problem since at least 3.1)

Steps to reproduce:

  1. Set up the insert link to have a custom server browser
  2. Click insert link
  3. Choose a link from the browser (the link should include the URL protocol).
  4. Click OK - link should appear in the editor as you would expect
  5. Insert a line and repeat steps 2-4. This time the second link has the protocol part of the URL duplicated.

See the screen shot on the forums for an idea of what this looks like.

I have ensured that the url I am returning from my custom browser is exactly the same each time (i.e. it is not that which is at fault).

Attachments

5855.patch (794 bytes) - added by alfonsoml 3 years ago.
Proposed patch

Change History

comment:1 Changed 4 years ago by Workbooks Dev

  • Cc cksource@… added
  • Priority changed from Normal to High

Hello,

Our customers keep bumping into this issue - The links withing emails they send often have a double http:// at the start e.g. http://http://www.website.com

The less IT literate people get a "broken link" message and complain the links don't work.

Many thanks, Keith (Workbooks)

comment:2 Changed 4 years ago by fredck

  • Priority changed from High to Normal

comment:3 Changed 4 years ago by alfonsoml

  • Keywords Pending added

Are you using the API to integrate correctly your file browser?

comment:4 Changed 4 years ago by Workbooks Dev

Yes, we are using the API as defined in teh documentation.

I have had a look back through the code and the filebrowserBrowseUrl property is being set correctly and we are using the defined approach for setting the resulting URL.

The URL we pass back through window.opener.CKEDITOR.tools.callFunction contains a full path including the protocol.

comment:5 Changed 4 years ago by alfonsoml

  • Keywords Confirmed added; Pending removed
  • Version set to 3.1

It fails only half of the time, even testing with the same file.

  • First: OK
  • Second: fails
  • Third: OK
  • Fourth: fails
  • etc...

Changed 3 years ago by alfonsoml

Proposed patch

comment:6 Changed 3 years ago by alfonsoml

  • Status changed from confirmed to review
  • Owner set to alfonsoml

The problem is that the regexp were using the Global modifier, so they try to continue from the previous position.

comment:7 Changed 3 years ago by alfonsoml

  • Status changed from review to closed
  • Resolution set to fixed
  • Milestone set to CKEditor 3.5.1

Now that the 3.5 has been released I've applied it as a microchange [6249]

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