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

Check link elements #51

Merged
merged 2 commits into from
Jul 14, 2014
Merged

Check link elements #51

merged 2 commits into from
Jul 14, 2014

Conversation

doktorbro
Copy link

There are a lot of link elements on a website: icons, feeds, etc. My addition treats them like a elements. According to the specification link elements must not have a href attribute, but I didn’t ever see one without.

@gjtorikian
Copy link
Owner

I would like to merge this in, I think it's useful.

Why would the spec say the href if not necessary, if it always is?

@doktorbro
Copy link
Author

Why would the spec say the href if not necessary, if it always is?

Sorry, I overlooked the requirement. The spec says, that the href attribute must be present:

The destination of the link(s) is given by the href attribute, which must be present and must contain a valid non-empty URL potentially surrounded by spaces. If the href attribute is absent, then the element does not define a link.

Sorry for misleading.

@gjtorikian
Copy link
Owner

For complete sanity could you add a test showing a link tag that is missing the href attribute? Thanks!

@doktorbro
Copy link
Author

Done.

gjtorikian added a commit that referenced this pull request Jul 14, 2014
@gjtorikian gjtorikian merged commit 6841d68 into gjtorikian:master Jul 14, 2014
@gjtorikian
Copy link
Owner

🚀

@doktorbro
Copy link
Author

Great. Now all the links in the head section are checked too.

@doktorbro doktorbro deleted the link-href branch July 14, 2014 05:53
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

Successfully merging this pull request may close these issues.

2 participants