I have a site which runs on AdaptiveTheme with Google fonts loaded via the theme's Appearance Settings page. Specifically I have a default font of Montserrat and the titles all set to Cinzel:700.

The HTML produced for the Google font api link does not validate on w3.validator.org.

<link type="text/css" rel="stylesheet" href="//fonts.googleapis.com/css?family=Montserrat|Cinzel:700" media="all" />

Produces an error that | is an invalid character for href.

It should be encoded as %7C. I've fixed my local copy in load.inc by changing

$google_fonts = implode('|', $used_fonts);

to

$google_fonts = implode('%7C', $used_fonts);

Not sure if that's the best way to fix it as presumably the whole href should be encoded but I hope it helps someone.

Comments

johnvb created an issue. See original summary.

Jeff Burnz’s picture

Status: Active » Reviewed & tested by the community

This seems like a reasonable fix to me. Good find, and thanks for the bug report!

Jeff Burnz’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.