-
-
Notifications
You must be signed in to change notification settings - Fork 29.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix HTML produced by http.server #57504
Comments
The code has a set of old HTML templates. Here is a patch to change it to very simple html5 templates. |
I think HTML 4.01 strict is still fine -- no need to move to HTML 5 yet. |
Here's a patch to replace 3.2 with 4.01. |
Ezio: your patch is fine for 3.3. I agree it's not a bug fix.
karl: HTML 3.2 may be old, but it's not outdated. |
Ezio, Martin, HTML 3.2, HTML 4.01 are not outdated. They have stable specifications. That said their doctypes have not influence at all in browsers. The html5 doctype <!DOCTYPE html> has been chosen because it was the minimal string of characters that put the browsers into strict mode rendering (See Quirks Mode in CSS). The W3C validator is the only tool implementing an SGML parser able to understand HTML 3.2 and HTML 4.01. Note also that the W3C validtor includes an html5 validator if the concern is the validity of the output. |
My point is that the HTML5 doctype doesn't bring us anything (except maybe a shorter string), so I don't see the point of changing it. |
Yup. I doesn't bring anything except putting the output in line with the reality of browsers implementations. You may close it. I don't mind. |
I’d rather fix the page (look at the diff to find one violation: the first heading is an h2 instead of h1) and use an HTML5 doctype, as it’s just HTML 4.01 + pragmatism. |
I declare the original issue closed - there is no reason to switch to HTML 5 in this code. There are side issues, such as the HTML 3.2 perhaps being incorrect; people who want to commit patches in that respect can just go ahead. |
Okay. |
Attached patch updates the pages to pass the validation, use HTML 4.01 and specify the encoding of the page in the <meta> tag. |
Thanks. +0. |
New changeset 10823e7be085 by Ezio Melotti in branch 'default': |
Fixed, thanks for the report and the reviews! |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: