Opened 14 years ago
Closed 13 years ago
#7564 closed Bug (invalid)
Entities in attributes
Reported by: | datalink | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | 3.0 |
Keywords: | Cc: |
Description
I work with files on windows, think that's the problem.
If I have german word "Frühling" in img alt attribute, ckeditor change it to "Frühling" after first saving, to "Frühling" after second and so on. Same with other attributes like content in meta tags or title in h1 tags. config.entities = true; has no effect.
Change History (6)
comment:1 Changed 14 years ago by
Status: | new → pending |
---|
comment:2 Changed 14 years ago by
I open demo version, switch to source and copy "Frühling" as alt to image. I switch to wysiwyg and back to source, ckeditor change "Frühling" to "Frühling".
On my local system I do following steps:
HTML page has source with "Frühling" as alt attribute.
Load page to editor, firefox source is "Frühling" - ckeditor sourcearea shows "Frühling" (I think it's double encoded)
Save page with php, HTML source is "Frühling"
Reopen page with editor, firefox source is "Frühling" - ckeditor sourcearea shows "Frühling"
Hope this helps.
comment:3 Changed 14 years ago by
Status: | pending → confirmed |
---|---|
Version: | 3.5.3 → 3.0 |
CKEditor is using UTF-8 encoding. You are probably using ISO in your application. When you paste an image with an alt attribute that contains HTML entities they are translated to human-readable characters in UTF-8. When you save the file, your application doesn't recognize encoding and that is why you are having problems. A quick workaround would be to switch your application to UTF-8.
The only problem with CKEditor is: why is it translating HTML entities if documentation says that HTML entities should be used in HTML code by default (http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.entities)? Is it a bug or some sort of by design feature?
comment:4 Changed 14 years ago by
Many, many hours later...
Think I find the mistake. My Applikation is in utf-8 and loads content with htmlentities($content). That makes ü from ü. Changes to htmlspecialchars($content) solved it.
comment:5 Changed 14 years ago by
Keywords: | Discussion added |
---|
comment:6 Changed 13 years ago by
Keywords: | Discussion removed |
---|---|
Resolution: | → invalid |
Status: | confirmed → closed |
Have you tried to reproduce this problem in demo page (http://nightly.ckeditor.com/demo)? Ajax example can be used for issue that you described.
I'm asking because this looks like a problem with encoding inside your application (or plug-in you are creating) not with CKEditor itself. Perhaps you have forgotten to set UTF-8 (or other encoding ) in some place?