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

meta refresh info fails to specify affected file #137

Closed
brianredbeard opened this issue Dec 16, 2019 · 2 comments
Closed

meta refresh info fails to specify affected file #137

brianredbeard opened this issue Dec 16, 2019 · 2 comments
Labels

Comments

@brianredbeard
Copy link

Describe the bug

When attempting to use htmltest to check a file I received the following output:

$ htmltest 
htmltest started at 11:49:49 on public
========================================================================
url in meta refresh must not start with single or double quote
url in meta refresh must not start with single or double quote
========================================================================
✘✘✘ failed in 9.020445ms
2 errors in 25 documents

Running this with increased logging allowed me to discover the affected files:

testDocument on media/video/index.html
url in meta refresh must not start with single or double quote
media/video/index.html
...
testDocument on media/photo/index.html
url in meta refresh must not start with single or double quote
media/photo/index.html

Versions

  • OS: Fedora 31
  • htmltest: 0.11.0

Adding Document: document, to the relevant AddIssue() call in:

hT.issueStore.AddIssue(issues.Issue{
Level: issues.LevelError,
Message: "url in meta refresh must not start with single or double quote",
Reference: ref,
})

Resolved the issue:

$ ~/Projects/golang/src/github.com/wjdp/htmltest/bin/htmltest 
htmltest started at 11:55:52 on public
========================================================================
media/video/index.html
  url in meta refresh must not start with single or double quote --- media/video/index.html --> <nil>
media/photo/index.html
  url in meta refresh must not start with single or double quote --- media/photo/index.html --> <nil>
========================================================================
✘✘✘ failed in 22.497733ms
2 errors in 25 documents

I doubt that this is the right answer (it seems through looking through the code that one chooses Document or Reference, but not both) but confirmed that it "works for me". My apologies, If i had the time to dig through the Reference mechanism to submit a "correct" fix I'd be all over it.

@wjdp
Copy link
Owner

wjdp commented Dec 17, 2019

Thanks for the excellent write-up! May be able to take a look hopefully in the next week.

@wjdp wjdp closed this as completed in 32ed5f8 Jan 16, 2021
@wjdp
Copy link
Owner

wjdp commented Jan 16, 2021

@brianredbeard You were right, as ref isn't set by the time that issue is created document should have been used instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants