Problem/Motivation

Our current charset metatag looks like this:

<meta name="charset" charset="utf-8" />

http://validator.w3.org/ gives you 3 (!) errors for that:

Apparently, it just wants charset and no other attribute..

Proposed resolution

Remove name="charset"

Remaining tasks

User interface changes

API changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Berdir’s picture

Status: Active » Needs review
FileSize
1.42 KB

Fixing it is easy enough ;) But still wondering if there is a reason we're doing it like this...

Berdir’s picture

Ok, did some digging, this was correctly converted to HTML a long time ago in #1174756: Convert <head> markup to HTML5.

But, for some reason ( I did not check why), the refactoring in #2218117: Bring back metatag support for the HtmlPage object added a name attribute.

Seems like a straight-forward bug, including wrong test coverage then.

I'm not sure if we should be testing anything else, testing that the name attribute is *not* there would be a bit strange.

Wim Leers’s picture

Issue tags: +markup

Status: Needs review » Needs work

The last submitted patch, 1: meta-charset-2405903-1.patch, failed testing.

Berdir’s picture

Issue tags: +Novice

Tagging novice, test needs a simple update to conform with the new tag that does not have the name attribute.

gvso’s picture

Status: Needs work » Needs review
FileSize
2.11 KB

Test updated

Status: Needs review » Needs work

The last submitted patch, 6: meta-charset-2405903-6.patch, failed testing.

Berdir’s picture

Requesting https.php with a legitimate simpletest User-Agent returns OK.	Browser	SimpleTestBrowserTest.php	105	Drupal\simpletest\Tests\SimpleTestBrowserTest->testUserAgentValidation()

I've seen that before and I don't think it is related to this issue.

Status: Needs work » Needs review
gvso’s picture

@berdir, yes... I wonder why the http.php passes but https.php doesn't, the only difference is the $_SERVER['HTTPS'] line...

lauriii’s picture

Status: Needs review » Reviewed & tested by the community
Wim Leers’s picture

Issue tags: +Quickfix

RTBC+1

alexpott’s picture

Status: Reviewed & tested by the community » Fixed
Issue tags: +SprintWeekend2015

This issue is a normal bug fix, and doesn't include any disruptive changes, so it is allowed per https://www.drupal.org/core/beta-changes. Committed c1005af and pushed to 8.0.x. Thanks!

  • alexpott committed c1005af on 8.0.x
    Issue #2405903 by Berdir, gvso: Our charset metatag is not valid HTML...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.