Opened 9 years ago

Closed 9 years ago

#13030 closed Bug (fixed)

Links to images with space are broken due to being encoded twice

Reported by: Wiktor Walc Owned by: Artur Delura
Priority: Normal Milestone: CKEditor 4.5.0 Beta
Component: General Version: 4.5.0 Beta
Keywords: Cc:

Description

CKEditor should not encode URLs that it receives from the server connector due to problems described in http://dev.ckeditor.com/ticket/5527

Currently, when dragging an image into CKEditor called foo bar.jpg, the (valid) response from CKFinder is:

{"fileName":"foo bar.jpg","uploaded":1,"url":"\/ckfinder\/userfiles\/files\/foo%20bar.jpg"}

unfortunately, the end result in CKEditor is:

<img src="/ckfinder/userfiles/files/foo%2520bar.jpg" style="height:480px; width:640px" />

See that the space is encoded twice.

Change History (12)

comment:1 Changed 9 years ago by Jakub Ś

Status: newconfirmed

comment:2 Changed 9 years ago by Jakub Ś

I believe the same thing is happening for UTF-8 characters lie ą ę ń etc.

In my case both files - with space or UTF-8 characters are not recognized. @pjasun told me that it should have been fix already.
@wwalc could you check if you are getting the same with UTF-8 characters?

comment:3 Changed 9 years ago by Piotr Jasiun

It was fixed but wwalc changes his mind every 3 weeks to keep us busy ;P

This encodeURI most probably should be removed: https://github.com/ckeditor/ckeditor-dev/blob/major/plugins/filetools/plugin.js#L177

comment:4 Changed 9 years ago by Artur Delura

To write manual tests benderjs:benderjs#190 should be closed.

Version 0, edited 9 years ago by Artur Delura (next)

comment:5 Changed 9 years ago by Artur Delura

Owner: set to Artur Delura
Status: confirmedassigned

comment:6 Changed 9 years ago by Artur Delura

Status: assignedreview

Changes in branch:t/13030. Unfotunatelly I can't run bender tests (branch dev).

comment:7 Changed 9 years ago by Piotrek Koszuliński

Status: reviewreview_failed

The manual test was broken, because it always loaded the lena.jpg file. What's worse - there's no single automated test for this change.

comment:8 Changed 9 years ago by Artur Delura

Status: review_failedassigned

comment:9 Changed 9 years ago by Artur Delura

Status: assignedreview

I have written automated test for issue changes in the same branch:t/13030.

comment:10 Changed 9 years ago by Piotrek Koszuliński

Status: reviewreview_failed

The test passed on major.

comment:11 Changed 9 years ago by Piotrek Koszuliński

Status: review_failedreview_passed

My bad - it fails on major. It must have been cache or sth.

comment:12 Changed 9 years ago by Piotrek Koszuliński

Resolution: fixed
Status: review_passedclosed

Fixed on major with git:b0d867d.

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