Problem/Motivation

This might be an odd one, as I'm reporting what I think is a bugfix, rather than a bug. Bear with me, please!

In version 1.0, we used to see inline css styles (which HTML purifier removes), we used to see them removed on save of the content. Meaning that the content saved in DB was stripped of these inline styles.

This changed in version 1.1, where any inline styles are now retained in the saved content in DB, and are only stripped when rendering the content.

Objectively, this new behaviour feels correct to me; retain the content as it's created and only process it on rendering. But our editors have gotten used to the editor basically cleaning up what they paste from Word (and not retaining the styles).

My question is:
I've looked at the changes from 1.0 to 1.1, but I couldn't figure out what resulted in this change. Any thoughts/ideas?
I imagine there might be others who also got used to the old behaviour and might want to retain it.

Steps to reproduce

1. Install HTML Purifier 1.0 (make sure it's set to strip inline styles)
2. Create content in Word and use colours and different fonts.
3. Copy and paste from Word directly into the editor
4. On initial paste, the text still looks as styled form Word
5. Save
6. Note how the content is is rendered without the styles, and also going back to edit the content the styles are completely removed.
7. Redo the above with HTML Purifier 1.1 install, and note how in step 6, when editing the content, the styles from Word are retained.

Proposed resolution

N/A
Not sure about this, tbh. I'm more trying to understand how it changed.

Remaining tasks

N/A

User interface changes

N/A

API changes

N/A

Data model changes

N/A

Comments

khaled.zaidan created an issue. See original summary.

khaled.zaidan’s picture

Issue summary: View changes
khaled.zaidan’s picture

Status: Active » Closed (works as designed)

Apologies. It seems the issue is not related or caused by this module.

Closing the ticket.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.