Opened 17 years ago
Closed 17 years ago
#2149 closed Bug (fixed)
Stylesheets with custom css urls are not attached to the editorarea
Reported by: | Jon Håvard Gundersen | Owned by: | Frederico Caldeira Knabben |
---|---|---|---|
Priority: | Normal | Milestone: | FCKeditor 2.6.2 |
Component: | General | Version: | FCKeditor 2.6 |
Keywords: | Confirmed Review+ | Cc: |
Description
We need to generate the css rules for each user which are using the fckeditor. To achieve this our css files are parsed as php files. To get correct css rules we send in the id as a GET parameter to the css files.
In this way we get urls like: /styles.css?id=15
This does not work with the new css cache feature in fckeditor. The problem is the regex used at least two places in fcktools.js (FCKTools.AppendStyleSheet and FCKTools.GetStyleHTML) which look like "/[
\/\.]\w*$/"
I have temporary changed the regex to /[
\/\.].*$/ in our solution, but you guys will surely come up with a better solution.
And why your at it, why don't you move this regex rule to your fckregexlib? At least it will be easier to customize.
Attachments (1)
Change History (7)
comment:1 Changed 17 years ago by
comment:2 Changed 17 years ago by
Keywords: | Confirmed HasPatch added |
---|---|
Milestone: | → FCKeditor 2.6.1 |
Version: | → FCKeditor 2.6 |
comment:3 Changed 17 years ago by
this last proposal can only work if the query string is just some numbers. It will fail for basic things like ?user=391&style=silver
Changed 17 years ago by
Attachment: | 2149.patch added |
---|
comment:4 Changed 17 years ago by
Keywords: | Review? added; HasPatch removed |
---|---|
Owner: | set to Frederico Caldeira Knabben |
Status: | new → assigned |
The "{" and "}" characters, other then been quite uncommon in URLs, are actually considered unsafe as per RFC. So, the proposed patch is checking for those chars now, which are required for any CSS definitions instead.
comment:5 Changed 17 years ago by
Keywords: | Review+ added; Review? removed |
---|
I realize that this bug is mostly our own fault, because of our special way of dealing with css files. But as previously mentioned it would have been easier to customize this rule if it was moved into the the regex lib. Now I have to redeclare both functions only because of my little tweak.
btw, currently I'm using "/[
\/\.][\w\?\=]*$/" as the regex.