Opened 5 years ago

Closed 5 years ago

#5256 closed Bug (fixed)

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

Reported by: wwalc Owned by: Saare
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 5 years ago.
5256_2.patch (721 bytes) - added by Saare 5 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 5 years ago by wwalc

  • Milestone set to CKEditor 3.5.1

#6777 marked as a dup.

comment:2 Changed 5 years ago by tobiasz.cudnik

  • Owner set to tobiasz.cudnik
  • Status changed from new to assigned

Changed 5 years ago by tobiasz.cudnik

comment:3 Changed 5 years ago by tobiasz.cudnik

  • Status changed from assigned to review

comment:4 Changed 5 years ago by garry.yao

  • Status changed from review to review_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 5 years ago by Saare

comment:5 Changed 5 years ago by Saare

  • Owner changed from tobiasz.cudnik to Saare
  • Status changed from review_failed to review

comment:6 Changed 5 years ago by garry.yao

  • Status changed from review to review_passed

comment:7 Changed 5 years ago by Saare

  • Resolution set to fixed
  • Status changed from review_passed to closed

Fixed with [6312].

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