Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment | File | Size | Author |
---|---|---|---|
#6 | meta-charset-2405903-6.patch | 2.11 KB | gvso |
#1 | meta-charset-2405903-1.patch | 1.42 KB | Berdir |
Comments
Comment #1
BerdirFixing it is easy enough ;) But still wondering if there is a reason we're doing it like this...
Comment #2
BerdirOk, 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.
Comment #3
Wim LeersComment #5
BerdirTagging novice, test needs a simple update to conform with the new tag that does not have the name attribute.
Comment #6
gvsoTest updated
Comment #8
BerdirI've seen that before and I don't think it is related to this issue.
Comment #10
gvso@berdir, yes... I wonder why the http.php passes but https.php doesn't, the only difference is the $_SERVER['HTTPS'] line...
Comment #11
lauriiiMore information about this: http://www.w3.org/TR/html-markup/meta.name.html
Comment #12
Wim LeersRTBC+1
Comment #13
alexpottThis 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!