Closed mtlynch closed 3 years ago
I can confirm this bug too. thanks htmltest 0.14.0 on MacOSX 10.14.6
I'm no good at golang, but looking at the source, it seems that the .isURLIgnored
function is called by checkExternal
& enforceHTTPS
.
Should also be called by (not sure if it is the right one) checkLink
. And may be (again not sure) in checkGenericRef
too.
checkLink
Not that simple because isURLIgnored
does a regexp on the local path, so this is too violent.
OK. I made a small patch with a new option IgnoreInternalURLs
for those use case. Seems to work fine.
I will look how to proper submit a PR
Sorry but i do not succeed to submit a PR. My branch ignore-local-urls
seems to be refused (permission) when I try to push it.
Can you let me know how I could do this in the best way for you ? Thanks?
git --no-optional-locks -c color.branch=false -c color.diff=false -c color.status=false -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree push -v --tags --set-upstream origin refs/heads/ignore-local-urls:refs/heads/ignore-local-urls
Pushing to https://github.com/wjdp/htmltest.git
remote: Permission to wjdp/htmltest.git denied to divinerites.
fatal: unable to access 'https://github.com/wjdp/htmltest.git/': The requested URL returned error: 403
Completed with errors, see above
@divinerites - You need to fork the repo.
Once you fork, you'll have permissions to push the branch to your personal fork. From there, you can make a pull request into the main repo.
Any news for my PR ? I use it on a daily basic with great success.
Describe the bug
I have a server-side redirect on my production site, but on the static site, it looks like a broken link. I want to tell htmltest to ignore it, but I can't figure out how. Using
IgnoreURLs
seems to have no effect on a relative URLTo Reproduce
IgnoreURLs
.htmltest.yml
Source files
Expected behaviour
htmltest ignores the broken
/foo/bar
relative link.Actual behaviour
htmltest reports error:
target does not exist --- index.html --> /foo/bar
Even if I change the
IgnoreURLs
to.*/foo/bar
, it still flags this as a broken link. I'm not sure if this is a bug in htmltest or if I'm misunderstanding how to specify IgnoreURLs for relative links.Versions
htmltest v0.14.0, 2021-01-23T18:38:58Z
Additional context
Thanks so much for your work on htmltest! I'd love to make a financial donation to the project if that's an option.