Opened 14 years ago
Last modified 8 years ago
#7352 confirmed Bug
Single quotes in attributes converted to double quotes — at Version 3
Reported by: | Marcel | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | Core : Output Data | Version: | 3.1.1 |
Keywords: | IE | Cc: |
Description (last modified by )
When using single quotes in html attributes they somehow get converted to double quotes and then htmlencoded to "
In my case this happens when I try to do this in the code view:
<a href="URL" style="font-family: 'Trebuchet MS';">Link</a>
Switch back to normal view and to code again, and CKEditor transformed it into this:
<a href="URL" style="font-family: "Trebuchet MS";">Link</a>
Not quite the desired result.
Is there a hotfix for this or do I have to wait for it to get fixed? (couldn't find it on Google)
Edit:
I did some checking. Here are the results:
- IE9 and IE10 - change ' character to "
- IE6-IE8 - delete the ' character
- Webkit, Opera and Firefox leave the ' character untouched.
Since editor 4.x is creating HTML from scratch in some places perhaps it should introduce "template behaviour" in which " goes outside and ' goes inside (or something like that).
Change History (3)
comment:1 Changed 14 years ago by
comment:2 Changed 14 years ago by
Keywords: | IE9 added; single quotes attribute converted double quotes removed |
---|---|
Status: | new → confirmed |
Version: | 3.5.2 → 3.1.1 |
<a href="URL" style="font-family: 'Trebuchet MS';">Link</a>
From version 3.1.1 in IE9 the above example is changed by CKEditor to: <a href="URL" style="font-family: "trebuchet ms";">Link</a>
Till version 3.1 (inclusive) the example is changed in IE7, IE8 and IE9 to : <a href="URL" style="font-family: ;" trebuchet="">Link</a>
comment:3 Changed 12 years ago by
Description: | modified (diff) |
---|---|
Keywords: | IE added; IE9 removed |
Another TC:
<div style="background-image:url('http://b.cksource.com/a/1/10th/ckeditor10years.png');">Test</div>
gets changed to (IE( and IE10)
<div style="background-image: url("http://b.cksource.com/a/1/10th/ckeditor10years.png");">Test</div>
or to (IE8 and IE7)
<div style="background-image: url(http://b.cksource.com/a/1/10th/ckeditor10years.png);">Test</div>
Forgot to mention: It only happens in IE9