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

Fix attempts at cleaning content #281

Merged
merged 4 commits into from
Dec 9, 2015
Merged
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
1 change: 0 additions & 1 deletion lib/html/proofer/utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ def clean_content(string)

matches.flatten.each do |url|
escaped_url = url.gsub(/&(?!amp;)/, '&')
escaped_url = escaped_url.gsub(%r{/}, '/')
string.gsub!(url, escaped_url)
end
string
Expand Down
122 changes: 122 additions & 0 deletions spec/html/proofer/fixtures/html/normal_looking_page.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href='https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,300,700' rel='stylesheet' type='text/css'>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-3769691-28', 'auto');
ga('send', 'pageview');
</script>

<!-- Begin Jekyll SEO tag -->
<title>Not found - GitHub and Government</title>
<meta property="og:title" content="Not found - GitHub and Government" />
<meta name="description" content="GitHub helps government build software better, together" />
<meta property='og:description' content="GitHub helps government build software better, together" />
<link rel="canonical" href="http://government.github.com/404.html" itemprop="url" />
<meta property='og:url' content='http://government.github.com/404.html' />
<meta property="og:site_name" content="GitHub and Government" />
<script type="application/ld+json">
{
"@context" : "http://schema.org",
"@type" : "WebSite",
"name" : "GitHub and Government",
"url" : "http://government.github.com"
}
</script>
<!-- End Jekyll SEO tag -->

</head>

<body class="support-page">

<div class="full-width olives">
<div class="navbar">
<div class="container">
<ul>
<li><a href="https://github.com/government/welcome#readme">Peer Group</a></li>
</ul>
</div>
</div>
<!-- .full-width here gets closed on support-page.html and home.html layouts -->

</div>
<div id="Not-found" class="container support-page">

<div class="mini-section">
<h1>Not found</h1>
<h3 class="description lead-graf"></h3>
</div>
</div>

<div class="container mini-section">
<h2 id="the-page-youre-looking-for-doesnt-seem-to-be-there">The page you’re looking for doesn’t seem to be there!</h2>

<h3 id="maybe-we-can-find-it-together-if-you-search-below">Maybe we can find it together if you search below.</h3>

<script>
var GOOG_FIXURL_LANG = "en";
var GOOG_FIXURL_SITE = "http://government.github.com";
</script>

<script src="//linkhelp.clients.google.com/tbproxy/lh/wm/fixurl.js"></script>


</div>

<script>
$(document).ready(function () {
(function ($) {
$('#filter').keyup(function () {
var rex = new RegExp($(this).val(), 'i');
$('.searchable tr').hide();
$('.searchable tr').filter(function () {
return rex.test($(this).text());
}).show();

if ($('.govtable tr:visible').length === 0) {
$('.govtable.no-matches').show();
} else {
$('.govtable.no-matches').hide();
$('.govtable.table-header').show();
};

if ($('.civictable tr:visible').length === 0) {
$('.civictable.no-matches').show();
} else {
$('.civictable.no-matches').hide();
$('.civictable.table-header').show();
};
})
}(jQuery));
});
</script>

<footer class="container">
<div class="site-footer clearfix">
<ul class="site-footer-links right no-style-list">
<li class="no-mobile"><a href="https://help.github.com/articles/github-glossary" target="_blank">Glossary</a></li>
<li class="no-mobile"><a href="https://help.github.com/security">Security</a></li>
<li><a href="mailto:government@github.com">Contact Us</a></li>
</ul>

<ul class="site-footer-links no-style-list">
<li class="no-mobile">&copy; 2014 GitHub Inc. All rights reserved.</li>
<li><a href="https://github.com/">GitHub.com</a></li>
<li class="no-mobile"><a href="https://github.com/about">About</a></li>
<li class="no-mobile"><a href="https://github.com/features/">Features</a></li>
</ul>
</div>
</footer>

<script>anchors.add('.org-table h4');</script>
</body>
</html>
<!-- Proudly powered by GitHub Pages ~ Generated 2015-12-09 14:05:31 -0800 -->
Loading