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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mkesicki’s picture

Status: Active » Closed (won't fix)

This 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.

jlea9378’s picture

I'm confused. We've been using CKEditor for over a year and it never stripped out inline CSS before. Why is this suddenly happening?

mkesicki’s picture

@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.

jlea9378’s picture

I 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.

jlea9378’s picture

It 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

mkesicki’s picture

Status: Closed (won't fix) » Needs work
dczepierga’s picture

Status: Needs work » Needs review
FileSize
3.98 KB

I create patch with fix for this bug. Pls review it, and write does it help or not.

Greetings

dczepierga’s picture

We 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

jlea9378’s picture

Status: Needs review » Needs work

Damian,

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.

mkesicki’s picture

Status: Needs work » Postponed (maintainer needs more info)

@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.

jlea9378’s picture

Status: Postponed (maintainer needs more info) » Needs review

That solved it. Thanks.

dczepierga’s picture

Status: Needs review » Fixed

We made some additional changes and improvments.
After review I commit all changes to GIT (diff).

Greetings

mkesicki’s picture

Status: Fixed » Closed (fixed)

Few small changes added in (diff) and (diff)