Opened 10 years ago
Closed 8 years ago
#13450 closed Bug (expired)
CKEditor leaving stray markup in style sheet
Reported by: | Marcus Bointon | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | Core : Output Data | Version: | |
Keywords: | Cc: |
Description
Today I was alerted to some errors from our CSS inliner. On inspecting it, I found that CKEditor had inserted a style tag in the middle of a style sheet, so it ended up like this:
... table.columns .right-text-pad { padding-right: 10px; } <style data-cke-temp="1">html{cursor:text;*cursor:auto} img,input,textarea{cursor:default} <style data-cke-temp="1">html{cursor:text;*cursor:auto} img,input,textarea{cursor:default} </style> ...
It was inserted right at the bottom of the style tag that was there already, but still inside it. It's nothing to do with our inliner as I've since found it in other content that doesn't use it.
As you can see, it looks like it has happened more than once. I'm getting the the contents of the editor using cke.getData(), saving it via XHR, which gives me a filtered version back, and so I reinject it into the editor with cke.setData(). For this to happen, it must mean that getData is including this temporary markup.
Very occasionally I've seen another similar problem where every image in the content (which usually gets the little drag cross icon attached top left on rollover) gets the drag icon image permanently attached.
I think it's similar in that it's temporary markup injected by ckeditor failing to be cleaned up in the final output, which should be free of such things.
Unfortunately I can't reproduce this reliably so can't give you a test case at present, but I assume that this is done in some consistent way.
Change History (2)
comment:1 Changed 10 years ago by
Status: | new → pending |
---|---|
Version: | 4.4.7 |
comment:2 Changed 8 years ago by
Resolution: | → expired |
---|---|
Status: | pending → closed |
We need test case to accept the issue otherwise it’s just "hey there is a problem in my implementation".
cleaned up in the final output If you are getting data from the editor using the getData method then please inspect what comes out of the browser in request.
Are you by any chance using third-party plugins or have made some core code modifications? They might be the source of your problem.