Skip to content
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

Multiple identical IDs in generated HTML #250

Closed
Jayman2000 opened this issue Jul 5, 2024 · 0 comments · Fixed by #253
Closed

Multiple identical IDs in generated HTML #250

Jayman2000 opened this issue Jul 5, 2024 · 0 comments · Fixed by #253
Labels
bug Something isn't working

Comments

@Jayman2000
Copy link
Contributor

Describe the bug
The about.hbs file in this repo causes invalid HTML to be generated. Specifically, it causes cargo-about generate to create multiple elements with the same ID.

To Reproduce
Steps to reproduce the behavior:

  1. cd into a clone of the cargo-about repo.
  2. Run cargo run -- generate --output-file test.html about.hbs
  3. Open test.html in a text editor and inspect the results. Notice how there’s multiple elements with id="Apache-2.0".

Expected behavior
test.html should contain valid HTML. Specifically, it should not contain more than one element with the same ID.

Screenshots

Device:

  • OS: NixOS 24.05
  • Browser Cargo version: 1.77.1

Additional context
Here’s the part of the HTML Standard that forbids multiple identical IDs:

When specified on HTML elements, the id attribute value must be unique amongst all the IDs in the element's tree and must contain at least one character.

@Jayman2000 Jayman2000 added the bug Something isn't working label Jul 5, 2024
@Jake-Shadle Jake-Shadle mentioned this issue Aug 12, 2024
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this issue Aug 15, 2024
[0.6.4] - 2024-08-12
Fixed
- [PR#254](EmbarkStudios/cargo-about#254) reverted unintended `id` -> `short_id` field rename.

[0.6.3] **yanked** - 2024-08-12
Changed
- [PR#251](EmbarkStudios/cargo-about#251) updated crates and directly depend on `semver`.

Fixed
- [PR#253](EmbarkStudios/cargo-about#253) resolved [#250](EmbarkStudios/cargo-about#250) by changing the example template to emit unique anchors.
- [PR#253](EmbarkStudios/cargo-about#253) resolved [#252](EmbarkStudios/cargo-about#252) by ignoring `SIGPIPE`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant