diff --git a/core/modules/rdf/rdf.module b/core/modules/rdf/rdf.module
index 39611bf17c4..061dd037313 100644
--- a/core/modules/rdf/rdf.module
+++ b/core/modules/rdf/rdf.module
@@ -567,11 +567,6 @@ function rdf_preprocess_image(&$variables) {
*/
function template_preprocess_rdf_metadata(&$variables) {
foreach ($variables['metadata'] as $key => $attributes) {
- // The XHTML+RDFa doctype allows either or syntax to
- // be used, but for maximum browser compatibility, W3C recommends the
- // former when serving pages using the text/html media type, see
- // http://www.w3.org/TR/xhtml1/#C_3.
-
if (!is_null($attributes)) {
$variables['metadata'][$key] = new Attribute($attributes);
}
diff --git a/core/modules/rdf/templates/rdf-metadata.html.twig b/core/modules/rdf/templates/rdf-metadata.html.twig
index 964cb0d6ede..4f6529448b6 100644
--- a/core/modules/rdf/templates/rdf-metadata.html.twig
+++ b/core/modules/rdf/templates/rdf-metadata.html.twig
@@ -3,6 +3,11 @@
* @file
* Default theme implementation for empty spans with RDF attributes.
*
+ * The XHTML+RDFa doctype allows either or syntax to
+ * be used, but for maximum browser compatibility, W3C recommends the
+ * former when serving pages using the text/html media type, see
+ * http://www.w3.org/TR/xhtml1/#C_3.
+ *
* Available variables:
* - metadata: Each item within corresponds to its own set of attributes,
* and therefore, needs its own 'attributes' element.