-
Notifications
You must be signed in to change notification settings - Fork 5
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 html-validation to detect malformed markup #15433
Closed
Closed
Changes from 10 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
5ff9164
Try using html-tidy for html validation
chrismytton c4b1e60
Travis CI config for html-tidy
chrismytton 291e220
Use tidy-html5 to validate the country page
octopusinvitro 611273c
Use tidy-html5 to validate the term-table page
octopusinvitro c3cbad8
Use tidy-html5 to validate the house page
octopusinvitro f6c491a
Use tidy-html5 to validate the house/download page
octopusinvitro 2337c51
Use tidy-html5 to validate the countries page
octopusinvitro c391689
Use tidy-html5 to validate the home page
octopusinvitro 1994b19
Add placeholder back to the select through JavaScript.
octopusinvitro 9dc19ab
fixup! Add placeholder back to the select through JavaScript.
octopusinvitro 86b502b
Move the skip to the test helper to avoid repetition/prevent errors
octopusinvitro File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -eo pipefail | ||
|
||
cd /tmp | ||
wget https://github.com/htacg/tidy-html5/archive/5.2.0.zip | ||
unzip 5.2.0.zip | ||
cd tidy-html5-5.2.0/build/cmake | ||
cmake ../.. | ||
make | ||
mkdir ~/bin | ||
mv tidy ~/bin/tidy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# frozen_string_literal: true | ||
require 'test_helper' | ||
require_relative '../../app' | ||
|
||
describe 'Countries' do | ||
describe 'HTML validation' do | ||
it 'has no errors in the countries page' do | ||
skip if `which tidy`.empty? | ||
get '/countries.html' | ||
last_response_must_be_valid | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -140,10 +140,13 @@ | |
<img src="/images/person-placeholder-108px.png" | ||
data-src="<%= person.proxy_image %>" | ||
style="display: none" | ||
class="person-card__image"> | ||
<noscript><img src="<%= person.proxy_image %>" class="person-card__image"></noscript> | ||
class="person-card__image" | ||
alt="Member headshot"> | ||
<noscript><img src="<%= person.proxy_image %>" class="person-card__image" | ||
alt="Member headshot"></noscript> | ||
<% else %> | ||
<img src="/images/person-placeholder-108px.png" class="person-card__image"> | ||
<img src="/images/person-placeholder-108px.png" class="person-card__image" | ||
alt="Placeholder image"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ditto here. "Placeholder image for Freddy McFreedy" seems like it might be more useful. |
||
<% end %> | ||
|
||
<h3 class="person-card__name"><%= person.name %></h3> | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is a plain "Member headshot" sufficient, when there might be hundreds of these across the page? Perhaps we should include the member's name here?