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

Skip patterns are ignored for external links #27

Closed
chalin opened this issue Oct 9, 2018 · 5 comments
Closed

Skip patterns are ignored for external links #27

chalin opened this issue Oct 9, 2018 · 5 comments

Comments

@chalin
Copy link
Collaborator

chalin commented Oct 9, 2018

For example, the following skip pattern:

forum/flutter-dev

seems to be ignored for the external link https://groups.google.com/forum/#!forum/flutter-dev:

http://localhost:4002/tos
- (807:12) 'flutter-..' => https://groups.google.com/forum/#!forum/flutter-dev (HTTP 200 but missing anchor)

cc @Sfshaza

@stas00
Copy link

stas00 commented Oct 18, 2018

I have the same issue, how do we deal with links like these? linkchecker tries to find #!forum/flutter-dev anchor.

I tried encoding the url:

https://groups.google.com/forum/%23%21forum/fastai-diff

but google doesn't decode the # part, only the !-part.

hash-bang has been deprecated for a while now: https://www.w3.org/blog/2011/05/hash-uris/ but google groups doesn't get updated :(

I used the domain instead to fix it. My current skip-urls file:

# #! url is deprecated and causes a false negative report
https://groups.google.com/forum/
# github blocks robots
https://github.com/

@filiph
Copy link
Owner

filiph commented Nov 4, 2018

Sorry for the late reply to this.

This seems to work for me. I've added a test case (0b7a581) and it passes (https://travis-ci.org/filiph/linkcheck/builds/450432074).

One thing to note is that the lines in the skip file are all regexp. That means that if you want to skip a #! url, you'll have to escape it properly. (I'm no regexp expert, but I think you'll have to do something like http://example\.com/#\!something.)

If this resolves your issue, I'll treat this as a documentation bug.

@stas00
Copy link

stas00 commented Nov 8, 2018

Thanks for getting back on this, @filiph, I ended up using w3c checklink since your tool is currently unreliable: #29

@chalin
Copy link
Collaborator Author

chalin commented Nov 12, 2018

Thanks for looking into this @filiph. I'll give it another try soon. (As for !, it shouldn't require escaping in such a case.)

@chalin
Copy link
Collaborator Author

chalin commented Nov 13, 2018

Strange, the same skip pattern indeed seems to be working now!

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

No branches or pull requests

3 participants