Issue #3195222 by smulvih2, ankithashetty, manish-31, larowlan, idebr, longwave: Incorrect favicon rel attribute value - shortcut

merge-requests/856/head
catch 2021-06-28 12:04:53 +01:00
parent 67bfb63d9a
commit f8dbc98afb
2 changed files with 4 additions and 4 deletions

View File

@ -597,7 +597,7 @@ function system_page_attachments(array &$page) {
$favicon = theme_get_setting('favicon.url');
$type = theme_get_setting('favicon.mimetype');
$page['#attached']['html_head_link'][][] = [
'rel' => 'shortcut icon',
'rel' => 'icon',
'href' => UrlHelper::stripDangerousProtocols($favicon),
'type' => $type,
];

View File

@ -29,9 +29,9 @@ class DefaultMetatagsTest extends BrowserTestBase {
$result = $this->xpath('//meta');
$this->assertEquals('utf-8', (string) $result[0]->getAttribute('charset'));
// Ensure that the shortcut icon is on the page.
$result = $this->xpath('//link[@rel = "shortcut icon"]');
$this->assertCount(1, $result, 'The shortcut icon is present.');
// Ensure that the icon is on the page.
$result = $this->xpath('//link[@rel = "icon"]');
$this->assertCount(1, $result, 'The icon is present.');
}
}