Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
c1005af3
Commit
c1005af3
authored
Jan 18, 2015
by
Alex Pott
Browse files
Issue
#2405903
by Berdir, gvso: Our charset metatag is not valid HTML according to W3C validator
parent
2f540a0f
Changes
3
Hide whitespace changes
Inline
Side-by-side
core/modules/system/src/Tests/Installer/InstallerTest.php
View file @
c1005af3
...
...
@@ -39,7 +39,7 @@ protected function setUpLanguage() {
// Test that \Drupal\Core\Render\BareHtmlPageRenderer adds assets and
// metatags as expected to the first page of the installer.
$this
->
assertRaw
(
'core/themes/seven/css/components/buttons.css'
);
$this
->
assertRaw
(
'<meta
name="charset"
charset="utf-8" />'
);
$this
->
assertRaw
(
'<meta charset="utf-8" />'
);
parent
::
setUpLanguage
();
}
}
core/modules/system/src/Tests/Page/DefaultMetatagsTest.php
View file @
c1005af3
...
...
@@ -22,12 +22,11 @@ class DefaultMetatagsTest extends WebTestBase {
public
function
testMetaTag
()
{
$this
->
drupalGet
(
''
);
// Ensures that the charset metatag is on the page.
$result
=
$this
->
xpath
(
'//meta[
@name="charset" and
@charset="utf-8"]'
);
$result
=
$this
->
xpath
(
'//meta[@charset="utf-8"]'
);
$this
->
assertEqual
(
count
(
$result
),
1
);
// Ensure that the charset one is the first metatag.
$result
=
$this
->
xpath
(
'//meta'
);
$this
->
assertEqual
((
string
)
$result
[
0
]
->
attributes
()
->
name
,
'charset'
);
$this
->
assertEqual
((
string
)
$result
[
0
]
->
attributes
()
->
charset
,
'utf-8'
);
// Ensure that the shortcut icon is on the page.
...
...
core/modules/system/system.module
View file @
c1005af3
...
...
@@ -551,7 +551,6 @@ function system_page_attachments(array &$page) {
'system_meta_content_type'
=>
array
(
'#tag'
=>
'meta'
,
'#attributes'
=>
array
(
'name'
=>
'charset'
,
'charset'
=>
'utf-8'
,
),
// Security: This always has to be output first.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment