diff --git a/core/modules/rdf/lib/Drupal/rdf/Tests/NodeAttributesTest.php b/core/modules/rdf/lib/Drupal/rdf/Tests/NodeAttributesTest.php index e8df665..26b5319 100644 --- a/core/modules/rdf/lib/Drupal/rdf/Tests/NodeAttributesTest.php +++ b/core/modules/rdf/lib/Drupal/rdf/Tests/NodeAttributesTest.php @@ -33,7 +33,12 @@ public static function getInfo() { * Creates a node of type article and tests its RDFa markup. */ function testNodeAttributes() { - $node = $this->drupalCreateNode(array('type' => 'article')); + // Create node with single quotation mark title to ensure it does not get + // escaped more than once. + $node = $this->drupalCreateNode(array( + 'type' => 'article', + 'title' => $this->randomName(8) . "'", + )); $node_uri = url('node/' . $node->nid, array('absolute' => TRUE)); $base_uri = url('', array('absolute' => TRUE)); diff --git a/core/modules/rdf/rdf.module b/core/modules/rdf/rdf.module index aaea6bb..e7c05ad 100644 --- a/core/modules/rdf/rdf.module +++ b/core/modules/rdf/rdf.module @@ -515,7 +515,7 @@ function rdf_preprocess_node(&$variables) { $element = array( '#tag' => 'meta', '#attributes' => array( - 'content' => $variables['label'], + 'content' => $variables['node']->label(), 'about' => $variables['node_url'], ), );