Trying to validate HTML5 on Joomla 2.5 site but I

2019-09-06 18:24发布

问题:

I´m currently trying to clean up a Joomla 2.5 site for HTML5 validation but I have a problem.

The HTML5 validator is reporting the following errors:

"Bad value og:title for attribute name on element meta: Keyword og:title is not registered."

"Bad value og:type for attribute name on element meta: Keyword og:type is not registered"

"Bad value og:url for attribute name on element meta: Keyword og:url is not registered"

"Bad value og:site_name for attribute name on element meta: Keyword og:site_name is not registered"

I have found out that the meta name attribute "og:xxxx" is generated only on pages that are linked to an article menu item. Unfortunately the front page is linked to such a menu item and I don´t know were the "og:" part is coming from.

I have tried to Google the problem and the only thing I can think is that it has do with Open Graph.

I hope that someone can help me fix this issue.

回答1:

og:title, og:type, og:url and og:site_name are values from the Open Graph protocol.

If they are not hardcoded in your theme, they are probably coming from a plugin (look for "Facebook", "Share" or "SEO" plugins).

However: Using these name values is not invalid! They are registered at MetaExtensions in the WHATWG wiki, which makes them valid according to the HTML5 spec. The validator is probably not up to date.