Opened 13 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 Jakub Ś)

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: &quot;Trebuchet MS&quot;;">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 &quot;
  • 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 13 years ago by Marcel

Forgot to mention: It only happens in IE9

comment:2 Changed 13 years ago by Jakub Ś

Keywords: IE9 added; single quotes attribute converted double quotes removed
Status: newconfirmed
Version: 3.5.23.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: &quot;trebuchet ms&quot;;">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 11 years ago by Jakub Ś

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(&quot;http://b.cksource.com/a/1/10th/ckeditor10years.png&quot;);">Test</div>

or to (IE8 and IE7)

<div style="background-image: url(http://b.cksource.com/a/1/10th/ckeditor10years.png);">Test</div>
Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy