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

Avoid truncating URLs in unquoted hrefs #69

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

charliermarsh
Copy link

Closes #68.

@@ -163,7 +162,7 @@ impl<'a> Parser<'a> {
let value = if let Some(quote) = self.stream.expect_oneof_and_skip(&[b'"', b'\'']) {
self.read_to(quote)
} else {
self.read_to4([b' ', b'\n', b'/', b'>'])
self.read_to3([b' ', b'\n', b'>'])
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per MDN, if the / isn't separated from the unquoted value by whitespace, it should be treated as part of the value. So I think it's correct to just omit it entirely here.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@charliermarsh
Copy link
Author

👋 Anything I can do to help this along? I'd prefer not to fork but also want to unblock our users. Thank you!

@musicinmybrain
Copy link

This is a polite ping about merging and releasing this fix.

As primary maintainer of the uv package in Fedora, it would be really helpful if uv could use a released version of tl from crates.io.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Quote-less href values are truncated
2 participants