Opened 8 years ago

Closed 8 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:


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:'

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 alfonsoml 8 years ago.
Proposed patch
4481_2.patch (1.6 KB) - added by fredck 8 years ago.

Download all attachments as: .zip

Change History (6)

Changed 8 years ago by alfonsoml

Proposed patch

comment:1 Changed 8 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 8 years ago by fredck

comment:2 Changed 8 years ago by fredck

  • Keywords Review? added; Review- removed

comment:3 Changed 8 years ago by garry.yao

  • Keywords Review+ added; Review? removed

comment:4 Changed 8 years ago by fredck

  • Resolution set to fixed
  • Status changed from assigned to closed

Fixed with [4365].

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