• Resolved christophvw

    (@christophvw)


    In functions.php line 306 the delimiter | in the google fonts URL isn’t properly escaped to %7C which leads to an error in w3c check.

    • This topic was modified 7 years, 8 months ago by christophvw.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Raul P.

    (@alignak)

    Hi,

    Thanks for letting me know, however this is intentional because that’s the format used by google themselves, ie: https://pasteboard.co/IhHJH00B8.png

    Furthermore, W3C is irrelevant if you have an HTML5 theme as a large part of it fails the normal W3C validation, ie: https://www.impressivewebs.com/understanding-html5-validation/

    You can however select the option to “inline google fonts” and the validation error will be gone.

    Thanks

    Thread Starter christophvw

    (@christophvw)

    The link about html5 validation you posted is 5 years old and my html5 wordpress page is validated without errors except the one with the google fonts.

    When I escape the pipe character it is validated fine and it is still working. And it looks like other projects escaped it as well:
    https://github.com/asciidoctor/asciidoctor/issues/1126

    And on https://developers.google.com/fonts/docs/getting_started on the section “Optimizing your font requests” they write “As with all query strings, you should URL-encode the value”.

    Plugin Author Raul P.

    (@alignak)

    I understand your point on this one too and I’ll consider url encoding the urls on the next version.

    However, the google url you’ve sent, you’re interpreting it wrong.
    It says that you should url encode the “values”, as in: “Hello World” to “Hello%20World” and not the rest. That being said, “we know” chars should be urlencoded regardless of what google gives us.

    Wait for a couple of days an a new update will be out.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘plugin doesn’t properly escape delimiter in google fonts url’ is closed to new replies.