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

Add option for empty href #468

Closed
surdu opened this issue Feb 24, 2018 · 5 comments
Closed

Add option for empty href #468

surdu opened this issue Feb 24, 2018 · 5 comments

Comments

@surdu
Copy link

surdu commented Feb 24, 2018

I would be nice to have and option similar to allow_hash_href but to disallow empty hrefs.

@iBobik
Copy link
Contributor

iBobik commented Jul 9, 2018

Could you please describe a few use-cases where is it needed?

@surdu
Copy link
Author

surdu commented Jul 9, 2018

I had generated html and the href was generated using a variable that was empty.

Also, forget to add href to an url ?

@iBobik
Copy link
Contributor

iBobik commented Jul 9, 2018

Correct me if I am wrong, but isn't it default now? I expected that if I write something like: <a href=""> html-proofer will fail on it.

@gjtorikian
Copy link
Owner

In the upcoming 4.x release allow_missing_href now exists for this

@gjtorikian
Copy link
Owner

For added context: HTML5 spec actually allows for missing hrefs, but I feel like more often than not this omission would be human error. So we go against the spec by default, but you can pass the flag in if you really want to allow missing hrefs.

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

No branches or pull requests

4 participants