#49126 closed defect (bug) (fixed)
Remove the xmlns attribute on the <html> tag
Reported by: | hommealone | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 5.5 | Priority: | normal |
Severity: | normal | Version: | 5.3.2 |
Component: | Administration | Keywords: | has-patch |
Focuses: | css, administration, coding-standards | Cc: |
Description
I think an update is needed to the function
_wp_admin_html_begin()
in the file wp-admin/includes/template.php beginning at line 2425.
The output of this function can be seen in the source code of any page in the WordPress admin area, right at the top.
I noticed first that the code contains this:
Wrong:
<html xmlns="http://www.w3.org/1999/xhtml"
Should be:
<html xmlns="https://www.w3.org/1999/xhtml"
But more importantly, perhaps, https://wordpress.org/support/users/joyously/|@joyously notes:
Looking at the URL, even though it redirects to https, it refers to http in its content. The other documents do also, when referencing the xmlns. And, having an XML namespace on a HTML5 document doesn’t even make sense. It should probably be removed entirely, just as the conditional for IE8 should be removed since the browser support is for a minimum of IE11 for quite awhile now.
(See: https://wordpress.org/support/topic/error-in-wp-admin-includes-template-php/ )
Attachments (3)
Change History (19)
#1
@
5 years ago
- Component changed from General to Administration
- Milestone changed from Awaiting Review to 5.4
- Owner set to SergeyBiryukov
- Status changed from new to reviewing
#2
follow-up:
↓ 3
@
5 years ago
- Keywords has-patch dev-feedback added
It seems many core files used "http://www.w3.org/1999/xhtml" IE8 code so do we need to remove that code also?
@SergeyBiryukov what is your thought?
#3
in reply to:
↑ 2
@
5 years ago
Replying to mukesh27:
It seems many core files used "http://www.w3.org/1999/xhtml" IE8 code so do we need to remove that code also?
Yes, it would make sense to me to remove that consistently, not just in one place.
#4
@
5 years ago
- Keywords needs-refresh added
@diddledan Can you please remove code from the other files?
#5
@
5 years ago
- Keywords needs-refresh removed
@diddledan Thanks for the update.
Remove needs-refresh keywords.
#6
@
5 years ago
49126.2.diff applies cleanly.
This ticket was mentioned in Slack in #core by valentinbora. View the logs.
5 years ago
#10
@
5 years ago
- Keywords needs-refresh added; commit removed
- Milestone changed from 5.4 to 5.5
A quick search of the folders ./src/wp-admin/css,./src/wp-includes/css
for .ie8
shows 43 results in 19 files. I excluded *.min.css,*-rtl.css
to try an avoid auto-generated files but there may be some false positives.
Given the latest patch is removing the reference rather than switching to https, I think this could wait until the next release and the IE8 fallbacks can be removed from both the HTML and CSS.
I've removed the commit keyword and added needs-refresh to account for the CSS fallbacks too.
Remove IE8 conditional and xmlns="" attribute in _wp_admin_html_begin()