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

Use tidy-html5 to validate the term-table page #15577

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@
require 'everypolitician/popolo'

require_relative './lib/popolo_helper'
require_relative './lib/html_helper'
require_rel './lib/page'

Dotenv.load
helpers Popolo::Helper
helpers HTMLHelper

set :erb, trim: '-'
set :main_url, 'http://everypolitician.org'
Expand Down
10 changes: 10 additions & 0 deletions lib/html_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# frozen_string_literal: true
module HTMLHelper
def escape_html(text)
Rack::Utils.escape_html(text)
end

def escape_uri(text)
URI.escape(text)
end
end
Loading