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

Url escapes are not normalized for local paths #135

Closed
BYK opened this issue Nov 12, 2021 · 7 comments
Closed

Url escapes are not normalized for local paths #135

BYK opened this issue Nov 12, 2021 · 7 comments
Labels
bug Something isn't working

Comments

@BYK
Copy link

BYK commented Nov 12, 2021

When a path has URL-unsafe characters, the URL to it gets escaped in the document but during link checking hyperlink does not unescape them to match the actual path, leading to errors like this:

Error: bad links:
  _next/static/chunks/pages/article/%5Bslug%5D-f92160effe6eedb195dc.js

The file _next/static/chunks/pages/article/[slug]-f92160effe6eedb195dc.js indeed exists on the disk.

@untitaker
Copy link
Owner

untitaker commented Nov 12, 2021 via email

@untitaker
Copy link
Owner

untitaker commented Nov 12, 2021 via email

@untitaker untitaker added the bug Something isn't working label Nov 12, 2021
@untitaker
Copy link
Owner

should be fixed in 0.1.18

@mre
Copy link

mre commented Nov 12, 2021

Looks like you found a more lightweight solution than url. Good work. 👍

@untitaker
Copy link
Owner

Yeah ignore the ping, i remember that lychee either had a distinct Link or Href type and wasn't really sure if I overlooked something but I think that should be fine for now.

@BYK
Copy link
Author

BYK commented Nov 15, 2021

This was super fast, thanks a lot @untitaker! I was hoping to get a patch out myself but I need to bump up my Rust skills first :)

@untitaker
Copy link
Owner

untitaker commented Nov 15, 2021 via email

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

No branches or pull requests

3 participants