Opened 15 years ago
Closed 15 years ago
#4481 closed Bug (fixed)
stylesCombo_stylesSet doesn't work for full url
Reported by: | Alfonso Martínez de Lizarrondo | Owned by: | Frederico Caldeira Knabben |
---|---|---|---|
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 15 years ago by
Attachment: | 4481.patch added |
---|
comment:1 Changed 15 years ago by
Keywords: | Review- added; Review? removed |
---|---|
Owner: | changed from Alfonso Martínez de Lizarrondo to Frederico Caldeira Knabben |
Status: | new → assigned |
At this point, let's make it totally generic, working even with more than two ":". the code can be even simpler.
Changed 15 years ago by
Attachment: | 4481_2.patch added |
---|
comment:2 Changed 15 years ago by
Keywords: | Review? added; Review- removed |
---|
comment:3 Changed 15 years ago by
Keywords: | Review+ added; Review? removed |
---|
Proposed patch