-
Notifications
You must be signed in to change notification settings - Fork 12.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
Rustdoc generates invalid HTML header #113067
Labels
A-rustdoc-ui
Area: Rustdoc UI (generated HTML)
C-bug
Category: This is a bug.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
Comments
@rustbot label A-rustdoc-ui T-rustdoc |
rustbot
added
A-rustdoc-ui
Area: Rustdoc UI (generated HTML)
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
labels
Jun 26, 2023
Thanks for the detailed report! Fixing it tomorrow. |
TaKO8Ki
added a commit
to TaKO8Ki/rust
that referenced
this issue
Jun 27, 2023
…-in-head, r=notriddle Fix invalid HTML DIV tag used in HEAD Fixes rust-lang#113067. The issue also nicely explains the whole problem. r? `@notriddle`
TaKO8Ki
added a commit
to TaKO8Ki/rust
that referenced
this issue
Jun 27, 2023
…-in-head, r=notriddle Fix invalid HTML DIV tag used in HEAD Fixes rust-lang#113067. The issue also nicely explains the whole problem. r? ``@notriddle``
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Jun 28, 2023
…-in-head, r=notriddle,fmease Fix invalid HTML DIV tag used in HEAD Fixes rust-lang#113067. The issue also nicely explains the whole problem. r? `@notriddle`
RalfJung
pushed a commit
to RalfJung/miri
that referenced
this issue
Jun 29, 2023
… r=notriddle,fmease Fix invalid HTML DIV tag used in HEAD Fixes rust-lang/rust#113067. The issue also nicely explains the whole problem. r? ``@notriddle``
lnicola
pushed a commit
to lnicola/rust-analyzer
that referenced
this issue
Apr 7, 2024
… r=notriddle,fmease Fix invalid HTML DIV tag used in HEAD Fixes rust-lang/rust#113067. The issue also nicely explains the whole problem. r? ``@notriddle``
RalfJung
pushed a commit
to RalfJung/rust-analyzer
that referenced
this issue
Apr 27, 2024
… r=notriddle,fmease Fix invalid HTML DIV tag used in HEAD Fixes rust-lang/rust#113067. The issue also nicely explains the whole problem. r? ``@notriddle``
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-rustdoc-ui
Area: Rustdoc UI (generated HTML)
C-bug
Category: This is a bug.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
The generated page HTML contains a
<div>
tag in the header, which is not valid as per the HTML spec (which only allows "Metadata content"). This has been the case since #106915, which moved this div from the body to the header.I believe browsers will open the body if an invalid tag is encountered in the header (which you can see in inspect elements, where every item in between
</div>
</head>
are inside of<body>
), or something like that.This causes at least one bug: the
#![doc(html_favicon_url = "...")]
attribute, which expands into a<link rel="icon" href="...">
, is not displayed on Chrome and Chromium-based browsers.You can see this in the
time
crate on docs.rs:Generated HTML:
vs inspect element:
Manually moving the
link
tag to the header correctly displays the favicon:2.
The text was updated successfully, but these errors were encountered: