Opened 7 years ago
Closed 7 years ago
#4481 closed Bug (fixed)
stylesCombo_stylesSet doesn't work for full url
| Reported by: | alfonsoml | Owned by: | fredck |
|---|---|---|---|
| Priority: | Normal | Milestone: | CKEditor 3.1 |
| Component: | Core : Styles | Version: | 3.0 |
| Keywords: | Review+ | Cc: |
Description
The code tries to split the configuration entry based on ':' and get a maximum of 2 splitted blocks, but the way that split() works is just ignoring the rest, not putting everything in the second value.
So using
config.stylesCombo_stylesSet = 'default:http://ckeditor.com/apps/ckeditor/3.0/plugins/stylescombo/styles/default.js?t=97KD'
means that it will try to load a file from the "http" url
This could have been avoided easily choosing any other separator as long as it isn't a valid part of a url.
The patch provides a solution without changing the separator, because although no one is able to use the full url setting, some people might have used the name:relative url syntax.
Attachments (2)
Change History (6)
Changed 7 years ago by alfonsoml
comment:1 Changed 7 years ago by fredck
- Keywords Review- added; Review? removed
- Owner changed from alfonsoml to fredck
- Status changed from new to assigned
At this point, let's make it totally generic, working even with more than two ":". the code can be even simpler.
Changed 7 years ago by fredck
comment:2 Changed 7 years ago by fredck
- Keywords Review? added; Review- removed
comment:3 Changed 7 years ago by garry.yao
- Keywords Review+ added; Review? removed
comment:4 Changed 7 years ago by fredck
- Resolution set to fixed
- Status changed from assigned to closed
Fixed with [4365].

Proposed patch