Add support for the RDFa `property` attribute.

Description

I overlooked that OpenGraph uses the property RDFa attribute for <meta> elements rather than the name property. See What is the attribute property=“og:title” inside meta tag?.

Add support for parsing page metadata from <meta property="…">. Note that the specification seems to allow multiple whitespace-separated values. If both are given, probably both should be used as equivalent to multiple property tokens in the attribute value.

Also implement generation of property attributes for metadata. A Stack Overflow answer referenced another answer indicating that both a name and a property attribute could be provided for the largest possible support. But it seems ugly to generate duplicates, and besides, all indications are that only RDFa property supports namespaces prefixes. So:

  • Accept both name and property attributes, even on the same <meta> element, but only process namespace prefixes in the property attribute.

  • When generating properties, use the name attribute if the property is in the default namespace (the URF ad-hoc namespace, i.e. not requiring a prefix); otherwise use the property attribute.

Environment

None

Assignee

Garret Wilson

Reporter

Garret Wilson

Labels

None

Components

Fix versions

Priority

Major
Configure