"Custom CSS" doesn't allow single or double quotes

Viewing 2 posts - 1 through 2 (of 2 total)
  • #6036
    jakestoeffler
    Participant

    Just a heads up on a bug I discovered. I attempted to use the “Custom CSS” text field (Theme Options -> Design -> Custom CSS) to add CSS styles that included quote marks. But the quote marks entered there aren’t correctly parsed/outputted.

    To demonstrate what I mean, here is the custom CSS I added: http://i.imgur.com/0DVcE.jpg
    Notice the line “font-family: ‘Ubuntu Mono’, sans-serif;” that contains quote marks.

    Here is how it shows up in the source view in the browser (Google Chrome): http://i.imgur.com/ileke.jpg

    And here is the error displayed in Chrome Developer tools: http://i.imgur.com/HUHtU.jpg

    The same thing happens with double quotes. And no quotes at all makes it invalid CSS and doesn’t work either. The only solution I found is to manually put this custom CSS in the header template file.

    I’m not sure if this is a WordPress bug or a bug on your end, but just a heads up in case anyone else is seeing similar behavior.

    #6053
    Daniel Tara
    Keymaster

    That’s an intentional limitation provided for security reasons. Normally if you enter a font’s name without quotes browsers recognize it. If you absolutely must use those quotes then try modifying the style.css file directly or creating a child theme.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.