I've discovered a bug where if a user changes text on their page from small to larger, then hits preview, then save, the change is stripped out. The span tag that was added during the format change is there, but the inline CSS style is removed. The change was visible during preview! It was only stripped/removed after clicking save. This bug only seems to apply to regular page authors, not the administrator (uid1).
I verified that the input format is set to filtered and that the filtered input format does NOT have the option checked to remove CSS styles.
I'm using the latest version of the module:
CKEditor - WYSIWYG HTML editor 6.x-1.10+10-dev (2012-Mar-23)
CKEditor 3.6.2
Drupal 6.25
Comment | File | Size | Author |
---|---|---|---|
#8 | 0003-1497184-by-dczepierga-Style-changes-lost-after-savin.patch | 5.28 KB | dczepierga |
#7 | 0001-1497184-by-dczepierga-Style-changes-lost-after-savin.patch | 3.98 KB | dczepierga |
Comments
Comment #1
mkesicki CreditAttribution: mkesicki commentedThis style is strip by Filtered HTML filter in drupal (it removes also styles attributes). Please read "Setting up Filters" section in CKEditor's module readme file or check http://drupal.ckeditor.com/filters.
Comment #2
jlea9378 CreditAttribution: jlea9378 commentedI'm confused. We've been using CKEditor for over a year and it never stripped out inline CSS before. Why is this suddenly happening?
Comment #3
mkesicki CreditAttribution: mkesicki commented@jlea9378 CKEditor doesn't strip anything. Drupal filters (especially security filters) can strip tags, styles etc.
First of all try use latest DEV versionm there is some patch to filters execution which can help here.
Comment #4
jlea9378 CreditAttribution: jlea9378 commentedI am using the latest dev.
I see a related patch on here: http://drupal.org/node/1491462 but it sounds like it's already applied to the version I have installed since I'm using the latest dev.
And my Input Format (Filtered HTML) has HTML Filter disabled. I've always used the Filtered HTML format, with the HTML filter disabled. It worked before.
Comment #5
jlea9378 CreditAttribution: jlea9378 commentedIt looks like this issue I originally posted in WYSIWYG Filter project is the same issue, and is actually a problem with CKEditor: http://drupal.org/node/1503598
Comment #6
mkesicki CreditAttribution: mkesicki commentedComment #7
dczepierga CreditAttribution: dczepierga commentedI create patch with fix for this bug. Pls review it, and write does it help or not.
Greetings
Comment #8
dczepierga CreditAttribution: dczepierga commentedWe found next bug in last patch, so i create new patch with fix - apply this patch on the last DEV version of CKEditor module (without first patch in this thread).
Pls review it, and write does it help or not.
Greetings
Comment #9
jlea9378 CreditAttribution: jlea9378 commentedDamian,
I downloaded the latest Dev (dated 29th) and installed it, then applied the patch in #8. It did not help. The styles are still being stripped out when the editor loads. Thanks.
Comment #10
mkesicki CreditAttribution: mkesicki commented@jlea9378, please check in "Security" section of CKEditor's profile configuration if you have "HTML filter" options enabled. If yes , turn it off. After this your styles attributes should be not stripped.
Comment #11
jlea9378 CreditAttribution: jlea9378 commentedThat solved it. Thanks.
Comment #12
dczepierga CreditAttribution: dczepierga commentedWe made some additional changes and improvments.
After review I commit all changes to GIT (diff).
Greetings
Comment #13
mkesicki CreditAttribution: mkesicki commentedFew small changes added in (diff) and (diff)