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

Internal link which has an encoded character - false positive #198

Open
Robin-Wils opened this issue Aug 31, 2020 · 6 comments
Open

Internal link which has an encoded character - false positive #198

Robin-Wils opened this issue Aug 31, 2020 · 6 comments
Labels
bug Something isn't working

Comments

@Robin-Wils
Copy link

I have an internal link with the character "ò" in it. Hugo encodes this character into the URL "%C3%B2".

The link checker reports it as a broken link, but it is a false positive. This probably happens because of the URL encoding.

@Munter
Copy link
Owner

Munter commented Sep 1, 2020

That definitely sounds like a bug. Any encoding that a browser or web server can handle should also be correctly handled by hyperlink

@Munter Munter added the bug Something isn't working label Sep 1, 2020
@Robin-Wils
Copy link
Author

It are pages like this. (open the table of contents).
https://robinwils.gitlab.io/categories/reviews/audition-movie/#audition--%C5%8Ddishon--movie

I haven't moved to Netlify yet, but might do so soon. I am just trying it out a bit for now.

image

image

@Conduitry
Copy link

I've run into the same thing. I have an <img src> with a URL that contains URL-encoded characters, and the file it points to exists but without the special characters encoded (which is all as it should be), but this plugin complains because it's not decoding the filename in the link before checking.

@Munter
Copy link
Owner

Munter commented Oct 14, 2020

@Conduitry Thanks for reporting. Could you paste an example image src-attribute value that exhibits this problem?

@Conduitry
Copy link

I was seeing it with a filename that contained an @ and a src that contained it encoded as %40. but I'd assume this would happen with any URL that needed to be decoded before it would match a local file's name.

@Conduitry
Copy link

It looks like the bug would actually be in the underlying hyperlink library, which is responsible for checking the links, and it looks like there's already an issue for it - Munter/hyperlink#169 - although I see a comment from you in May that you were unable to reproduce that issue.

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