Issue #2011918 by Liam Morland, jesse.d, scor: Fixed Titles are often double-escaped (including in the content attribute of the dc:title meta element for nodes).
parent
120bbc9701
commit
5778af9115
|
@ -51,7 +51,12 @@ class NodeAttributesTest extends NodeTestBase {
|
|||
* 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->id(), array('absolute' => TRUE));
|
||||
$base_uri = url('<front>', array('absolute' => TRUE));
|
||||
|
|
|
@ -260,7 +260,7 @@ function rdf_preprocess_node(&$variables) {
|
|||
$title_mapping = $mapping->getPreparedFieldMapping('title');
|
||||
if ($title_mapping) {
|
||||
$title_attributes['property'] = empty($title_mapping['properties']) ? NULL : $title_mapping['properties'];
|
||||
$title_attributes['content'] = $variables['label'];
|
||||
$title_attributes['content'] = $variables['node']->label();
|
||||
$variables['title_suffix']['rdf_meta_title'] = array(
|
||||
'#theme' => 'rdf_metadata',
|
||||
'#metadata' => array($title_attributes),
|
||||
|
|
Loading…
Reference in New Issue