WordPress.org

Ready to get started?Download WordPress

Forums

WP Google Fonts
HTML Validation Bug (4 posts)

  1. ahmadhh
    Member
    Posted 1 year ago #

    I'm getting a validation error from using Open Sans. It seems to trim the spaces everywhere else.

    Bad value http://fonts.googleapis.com/css?family=Open Sans:light,lightitalic,regular,regularitalic,600,600italic,bold,bolditalic,800,800italic for attribute href on element link: Whitespace in query component. Use %20 in place of spaces.

    http://wordpress.org/extend/plugins/wp-google-fonts/

  2. thrawn12
    Member
    Posted 1 year ago #

    in wp-google-fonts.php try editing the Option Value for Open Sans from

    Open Sans:light,lightitalic,regular,regularitalic,600,600italic,bold,bolditalic,800,800italic

    to

    Open%20Sans:light,lightitalic,regular,regularitalic,600,600italic,bold,bolditalic,800,800italic

  3. ahmadhh
    Member
    Posted 1 year ago #

    Thanks, but it won't fix the bug for everyone else that tries downloading the latest version of this plugin.

    I went ahead with a different font for now. I will leave this as a courtesy note to the developer.

  4. Eric McNiece
    Member
    Posted 1 year ago #

    I also hit the space/%20 validation error. This is not a hard fix... hint, hint:

    echo '<link href=\''.$http.'://fonts.googleapis.com/css?family='.$googlefont1.'\' rel=\'stylesheet\' type=\'text/css\' />';

    becomes

    echo '<link href=\''.$http.'://fonts.googleapis.com/css?family='.str_replace(' ', '%20', $googlefont1).'\' rel=\'stylesheet\' type=\'text/css\' />';

    Adrian, please confirm that you will fix this for the next release!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic