-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Description
My markdown file contains this:
Notice that %23 is part of the file name. It is not meant to be discarded as a url fragment. The web server uses the file name to generate the following image with the text "slack #inspektor-gadget" inside:
However, the link checker decodes %23 into #, interprets it as a url fragment, and discards it:
Line 39 in 3263c3b
| const url = encodeURI(decodeURIComponent(new URL(link, opts.baseUrl).toString())); |
Tested with a local web server with the following:
$ cat README2.md
]
$ nc -lkp 8080 &
[1] 4003675
$ docker run --net=host -v .:/tmp:ro --rm -i ghcr.io/tcort/markdown-link-check:stable /tmp/README2.md
FILE: /tmp/README2.md
HEAD /badge/slack- HTTP/1.1
accept: */*
user-agent: link-check/5.4.0
host: localhost:8080
Connection: close
Notice how the URL of the HTTP request made by link-check is truncated to /badge/slack-.
Metadata
Metadata
Assignees
Labels
No labels