• Hello there,

    I am trying to make my theme output valid with xhtml5, but the function rest_output_link_wp_head() generates invalid head tag including an URL as a rel value. <link rel=”https://api.w.org/&#8221; href=”%s” />

    I can remove this with a function, but that would be plugin territory in case I want to upload my theme to wordpress.org.

    Why is this necessary? Why is invalid? Is there a workaround? Can this change to be valid in the future?

    Thank you.

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    The API link is to provide for proper REST API discovery. It’s valid for HTML5. XHTML5 is an evolving standard. Apparently the URL is not a registered keyword for rel attributes like “alternate” would be. Changing or removing the link would prevent formal discovery of the API route. I’m not sure how many apps go through formal discovery. Many simply try to access directly and it either works or it doesn’t. Still discovery is the “proper” way to utilize the API. It’s unclear what a compliant discovery solution would be if rel attributes must be limited to registered keywords. Whatever it might be would likely break existing apps that utilize the proper discovery process..

Viewing 1 replies (of 1 total)
  • The topic ‘rel=”https://api.w.org/” – Invalid sintax’ is closed to new replies.