diff --git a/core/modules/rdf/rdf.module b/core/modules/rdf/rdf.module
index d672820..c2b75b7 100644
--- a/core/modules/rdf/rdf.module
+++ b/core/modules/rdf/rdf.module
@@ -440,11 +440,11 @@ function rdf_preprocess_comment(&$variables) {
// Adds RDFa markup for the relation between the comment and its author.
$author_mapping = $mapping->getPreparedFieldMapping('uid');
if (!empty($author_mapping)) {
- $author_attributes = array('rel' => $author_mapping['properties']);
- // Wraps the author variable and the submitted variable which are both
+ // Wraps the 'author' and 'submitted' variables which are both
// available in comment.html.twig.
- $variables['author'] = SafeMarkup::set('' . $variables['author'] . '');
- $variables['submitted'] = SafeMarkup::set('' . $variables['submitted'] . '');
+ $author_attributes = new Attribute(['rel' => $author_mapping['properties']]);
+ $variables['author'] = SafeMarkup::format('@author', ['@author_attributes' => $author_attributes,'@author' => $variables['author']]);
+ $variables['submitted'] = SafeMarkup::format('@submitted', ['@author_attributes' => $author_attributes,'@submitted' => $variables['submitted']]);
}
// Adds RDFa markup for the date of the comment.
$created_mapping = $mapping->getPreparedFieldMapping('created');
@@ -460,8 +460,8 @@ function rdf_preprocess_comment(&$variables) {
$created_metadata_markup = drupal_render($rdf_metadata);
// Appends the markup to the created variable and the submitted variable
// which are both available in comment.html.twig.
- $variables['created'] = SafeMarkup::set(SafeMarkup::escape($variables['created']) . $created_metadata_markup);
- $variables['submitted'] = SafeMarkup::set($variables['submitted'] . $created_metadata_markup);
+ $variables['created'] = SafeMarkup::format('@created@metadata_markup', ['@created' => $variables['created'], '@metadata_markup' => $created_metadata_markup]);
+ $variables['submitted'] = SafeMarkup::format('@submitted@metadata_markup' , ['@submitted' => $variables['submitted'], '@metadata_markup' => $created_metadata_markup]);
}
$title_mapping = $mapping->getPreparedFieldMapping('subject');
if (!empty($title_mapping)) {