Ticket #5256 (closed Bug: fixed)

Opened 4 years ago

Last modified 3 years ago

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

5256.patch (2.1 KB) - added by tobiasz.cudnik 3 years ago.
5256_2.patch (721 bytes) - added by Saare 3 years ago.

Change History

comment:1 Changed 3 years ago by wwalc

  • Milestone set to CKEditor 3.5.1

#6777 marked as a dup.

comment:2 Changed 3 years ago by tobiasz.cudnik

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

Changed 3 years ago by tobiasz.cudnik

comment:3 Changed 3 years ago by tobiasz.cudnik

  • Status changed from assigned to review

comment:4 Changed 3 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 3 years ago by Saare

comment:5 Changed 3 years ago by Saare

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

comment:6 Changed 3 years ago by garry.yao

  • Status changed from review to review_passed

comment:7 Changed 3 years ago by Saare

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

Fixed with [6312].

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