When I use FontYourFace to alter font families, the changes look right when I preview them, but when the I save the change the font family style gets lost. I finally figured out that the problem is that font family names that are enclosed with quote marks are getting garbled when the css is written to a file. I end up with something like the following in my css file:

font-family: 'Palatino Linotype', Palatino, Serif;
CommentFileSizeAuthor
#1 style_no_htmlentities.patch1.73 KBkarens

Comments

karens’s picture

Status: Active » Needs review
StatusFileSize
new1.73 KB

Here's one possible solution.

jyve’s picture

Status: Needs review » Fixed

Hi Karen,

Thanks for the patch. It has been applied to the dev version.

heine’s picture

Status: Fixed » Active

Running check_plain on CSS makes no sense. What are you trying to accomplish?

swentel’s picture

As briefly mentioned on IRC, avoid that the hidden field could be injected with XSS exploits. Heine suggests to use a CSS filter which is not in Drupal Core, but cTools has a css include file which seems to have some filtering methods. Will talk to merlin about this.

swentel’s picture

Status: Active » Fixed

Ok, instead of using check_plain(), ctools_css_filter() is now used from the css.inc file in ctools (see http://drupalcode.org/viewvc/drupal/contributions/modules/ctools/include...)

It's using the default allowed properties and values. So far, everything seems to be working out fine. If we need more default properties & values for the filter, we can use ctools_css_filter_css_data() to override them.

jyve’s picture

Status: Fixed » Closed (fixed)