﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
10750	The editor don't unquote the font-family style property	Leeron 	Marek Lewandowski	"Hopefully I'm missing something here, but here it goes:

I came across a problem where fonts with names like 'My Crazy Sans -32432 W10' doesn't work properly. Looking into it noticed that the font-family is added to the HTML unquoted.
{{{
<span style=""font-family:my crazy sans -32432 w10;my crazy sans -386932 w02;sans-serif"">Some text here.</span>
This inline style property doesn't work on my browser (latest Chrome).
}}}

Digging into the code I found the following code at the end of the tools.js file (inside the parseCssText function):
{{{
// Normalize font-family property, ignore quotes and being case insensitive. (#7322)
// http://www.w3.org/TR/css3-fonts/#font-family-the-font-family-property
if ( name == 'font-family' )
    value = value.toLowerCase().replace( /[""']/g, '' ).replace( /\s*,\s*/g, ',' );
}}}

Noticing the (#7322) remark, I went looking for the ticket - ​http://dev.ckeditor.com/ticket/7322.


I guess the editor have a problem with handling quoted font-family values internally. But the spec (that the code and the ticket point to) state clearly that on the HTML (and CSS) the value should be quoted.

And again - it's not only contrast with W3 recommendations, it actually doesn't work on my browser.

From ​http://www.w3.org/TR/CSS2/fonts.html#font-family-prop :
{{{
To avoid mistakes in escaping, it is recommended to quote font family names 
that contain white space, digits, or punctuation characters other than hyphens:

body { font-family: ""New Century Schoolbook"", serif }

<BODY STYLE=""font-family: '21st Century', fantasy"">
}}}"	Bug	closed	Normal	CKEditor 4.5.10	General	4.0	fixed	Support	Oracle
