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)

4481.patch (1.5 KB) - added by Alfonso Martínez de Lizarrondo 15 years ago.
Proposed patch
4481_2.patch (1.6 KB) - added by Frederico Caldeira Knabben 15 years ago.

Download all attachments as: .zip

Change History (6)

Changed 15 years ago by Alfonso Martínez de Lizarrondo

Attachment: 4481.patch added

Proposed patch

comment:1 Changed 15 years ago by Frederico Caldeira Knabben

Keywords: Review- added; Review? removed
Owner: changed from Alfonso Martínez de Lizarrondo to Frederico Caldeira Knabben
Status: newassigned

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 Frederico Caldeira Knabben

Attachment: 4481_2.patch added

comment:2 Changed 15 years ago by Frederico Caldeira Knabben

Keywords: Review? added; Review- removed

comment:3 Changed 15 years ago by Garry Yao

Keywords: Review+ added; Review? removed

comment:4 Changed 15 years ago by Frederico Caldeira Knabben

Resolution: fixed
Status: assignedclosed

Fixed with [4365].

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy