Opened 8 years ago

Closed 7 years ago

#5256 closed Bug (fixed)

JS error when percent sign used in image url in the Image Dialog

Reported by: Wiktor Walc Owned by: Sa'ar Zac Elias
Priority: Normal Milestone: CKEditor 3.5.1
Component: General Version: 3.0
Keywords: Cc:

Description

This is rather a rare situation, anyway it seems that people are using placeholders for a directory where images are stored to replace it later with a valid directory. When placeholder contains a "%" character in it's name, IE is throwing a JS error in the Image Dialog (probably because it expects a correct hexadecimal value after % (?)). This bug exists also in FCKeditor.

Steps to reproduce

  • Open Image Dialog
  • Paste the following url:
    [%placeholder%]/file.jpg
    
  • click on the "Alternative text" input element
  • Result: JavaScript error (invalid argument)

Attachments (2)

5256.patch (2.1 KB) - added by Tobiasz Cudnik 7 years ago.
5256_2.patch (721 bytes) - added by Sa'ar Zac Elias 7 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 7 years ago by Wiktor Walc

Milestone: CKEditor 3.5.1

#6777 marked as a dup.

comment:2 Changed 7 years ago by Tobiasz Cudnik

Owner: set to Tobiasz Cudnik
Status: newassigned

Changed 7 years ago by Tobiasz Cudnik

Attachment: 5256.patch added

comment:3 Changed 7 years ago by Tobiasz Cudnik

Status: assignedreview

comment:4 Changed 7 years ago by Garry Yao

Status: reviewreview_failed

Is it possible that we simply make no assumption on form of (no decodeURI) the image "src"? We're also not doing that for link elements. Thus it's possible for user to keep anything they want inside the url.

Changed 7 years ago by Sa'ar Zac Elias

Attachment: 5256_2.patch added

comment:5 Changed 7 years ago by Sa'ar Zac Elias

Owner: changed from Tobiasz Cudnik to Sa'ar Zac Elias
Status: review_failedreview

comment:6 Changed 7 years ago by Garry Yao

Status: reviewreview_passed

comment:7 Changed 7 years ago by Sa'ar Zac Elias

Resolution: fixed
Status: review_passedclosed

Fixed with [6312].

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