Opened 7 years ago

Closed 6 years ago

#5855 closed Bug (fixed)

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@…



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 (1)

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

Download all attachments as: .zip

Change History (8)

comment:1 Changed 7 years ago by Workbooks Dev

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


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

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

Many thanks, Keith (Workbooks)

comment:2 Changed 7 years ago by fredck

  • Priority changed from High to Normal

comment:3 Changed 7 years ago by alfonsoml

  • Keywords Pending added

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

comment:4 Changed 7 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 contains a full path including the protocol.

comment:5 Changed 7 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 7 years ago by alfonsoml

Proposed patch

comment:6 Changed 7 years ago by alfonsoml

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

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

comment:7 Changed 6 years ago by alfonsoml

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

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 – 2016 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy