Skip to content
Snippets Groups Projects
Commit 584907e1 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2422039 by idebr: Double escaping in search result info

parent 7f6f61f4
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -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 @@ protected function setUp() {
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 @@ function testPhraseSearchPunctuation() {
$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);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment