Opened 8 years ago

Closed 8 years ago

#4240 closed Bug (fixed)

CKEditor does not work with elements with hyphen in their ID

Reported by: Wiktor Walc Owned by: Garry Yao
Priority: Normal Milestone: CKEditor 3.0
Component: General Version:
Keywords: Confirmed HasPatch Review+ Cc:

Description

Open replacebycode.html sample, change the ID "editor2" into "edi-tor2", launch it in your browser and an error will occur (and as a result the event instanceReady is not triggered):

invalid assignment left-hand side
javascript:void(%20setTimeout(%20function()%7Bdocument.open()%3Bdocument.write(%20window.parent._cke_htmlToLoad_edi-tor2%20)%3Bdocument.close()%3Bwindow.parent._cke_htmlToLoad_edi-tor2%20%3D%20null%3B%7D%2C%200%20)%20)
Line 1

Note: window.parent._cke_htmlToLoad_edi-tor

CKEditor should support at least this:

ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods (".").

It seems that the source of this problem is the wysiwygarea plugin: 'window.parent._cke_htmlToLoad_' + editor.name + ' (line 244-246)

Attachments (1)

4240.patch (912 bytes) - added by Garry Yao 8 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 8 years ago by Garry Yao

Keywords: Confirmed HasPatch added
Milestone: CKEditor 3.0CKEditor 3.1
Priority: HighNormal

Changed 8 years ago by Garry Yao

Attachment: 4240.patch added

comment:2 Changed 8 years ago by Garry Yao

Keywords: Review? added
Milestone: CKEditor 3.1CKEditor 3.0
Owner: set to Garry Yao
Status: newassigned

Wiktor point me that it's critical for CKEditor to work with Drupal, so retarget to this release.

comment:3 Changed 8 years ago by Wiktor Walc

Keywords: Review+ added; Review? removed

I've searched in CKEditor source code for + editor.name and wysiwygarea plugin was the only place where it was incorrectly used, so R+.

comment:4 Changed 8 years ago by Garry Yao

Resolution: fixed
Status: assignedclosed

Fixed with [4111] on trunk and [4110] on 3.0.x branch.

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