Opened 7 years ago
Closed 7 years ago
#4240 closed Bug (fixed)
CKEditor does not work with elements with hyphen in their ID
| Reported by: | wwalc | 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)
Change History (5)
comment:1 Changed 7 years ago by garry.yao
- Keywords Confirmed HasPatch added
- Milestone changed from CKEditor 3.0 to CKEditor 3.1
- Priority changed from High to Normal
Changed 7 years ago by garry.yao
comment:2 Changed 7 years ago by garry.yao
- Keywords Review? added
- Milestone changed from CKEditor 3.1 to CKEditor 3.0
- Owner set to garry.yao
- Status changed from new to assigned
Wiktor point me that it's critical for CKEditor to work with Drupal, so retarget to this release.
comment:3 Changed 7 years ago by wwalc
- 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 7 years ago by garry.yao
- Resolution set to fixed
- Status changed from assigned to closed

Ticket test added with [4104] at : source:CKEditor/trunk/_test/tt/4240/4240.html