Issue #2422039 by idebr: Double escaping in search result info
parent
7f6f61f4a2
commit
584907e1ac
|
@ -59,6 +59,10 @@ function template_preprocess_search_result(&$variables) {
|
|||
$variables['snippet'] = isset($result['snippet']) ? $result['snippet'] : '';
|
||||
// Provide separated and grouped meta information..
|
||||
$variables['info_split'] = $info;
|
||||
$variables['info'] = implode(' - ', $info);
|
||||
$variables['info'] = array(
|
||||
'#type' => 'inline_template',
|
||||
'#template' => '{{ info|safe_join(" - ") }}',
|
||||
'#context' => array('info' => $info),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ class SearchNodePunctuationTest extends SearchTestBase {
|
|||
node_access_rebuild();
|
||||
|
||||
// Create a test user and log in.
|
||||
$this->testUser = $this->drupalCreateUser(array('access content', 'search content', 'use advanced search'));
|
||||
$this->testUser = $this->drupalCreateUser(array('access content', 'search content', 'use advanced search', 'access user profiles'));
|
||||
$this->drupalLogin($this->testUser);
|
||||
}
|
||||
|
||||
|
@ -47,5 +47,9 @@ class SearchNodePunctuationTest extends SearchTestBase {
|
|||
$edit = array('keys' => '"bunny\'s"');
|
||||
$this->drupalPostForm('search/node', $edit, t('Search'));
|
||||
$this->assertText($node->label());
|
||||
|
||||
// Check if the author is linked correctly to the user profile page.
|
||||
$username = $node->getOwner()->getUsername();
|
||||
$this->assertLink($username);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue