Skip to content

Commit

Permalink
Merge pull request #177 from jweir/ruby-version-cleanup
Browse files Browse the repository at this point in the history
Remove checks for Ruby versions no longer supported
  • Loading branch information
flavorjones committed Feb 3, 2024
2 parents 41ee2f8 + 589c938 commit 2936937
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Gemfile
Expand Up @@ -16,5 +16,5 @@ group :rubocop do
end

# specify gem versions for old rubies
gem "nokogiri", RUBY_VERSION < "2.1" ? "~> 1.6.0" : ">= 1.7"
gem "activesupport", RUBY_VERSION < "2.2.2" ? "~> 4.2.0" : ">= 5"
gem "nokogiri", ">= 1.7"
gem "activesupport", ">= 5"
8 changes: 0 additions & 8 deletions test/sanitizer_test.rb
Expand Up @@ -728,8 +728,6 @@ def test_abbr_attribute
end

def test_uri_escaping_of_href_attr_in_a_tag_in_safe_list_sanitizer
skip if RUBY_VERSION < "2.3"

html = %{<a href='examp<!--" unsafeattr=foo()>-->le.com'>test</a>}

text = safe_list_sanitize(html)
Expand All @@ -747,8 +745,6 @@ def test_uri_escaping_of_href_attr_in_a_tag_in_safe_list_sanitizer
end

def test_uri_escaping_of_src_attr_in_a_tag_in_safe_list_sanitizer
skip if RUBY_VERSION < "2.3"

html = %{<a src='examp<!--" unsafeattr=foo()>-->le.com'>test</a>}

text = safe_list_sanitize(html)
Expand All @@ -766,8 +762,6 @@ def test_uri_escaping_of_src_attr_in_a_tag_in_safe_list_sanitizer
end

def test_uri_escaping_of_name_attr_in_a_tag_in_safe_list_sanitizer
skip if RUBY_VERSION < "2.3"

html = %{<a name='examp<!--" unsafeattr=foo()>-->le.com'>test</a>}

text = safe_list_sanitize(html)
Expand All @@ -785,8 +779,6 @@ def test_uri_escaping_of_name_attr_in_a_tag_in_safe_list_sanitizer
end

def test_uri_escaping_of_name_action_in_a_tag_in_safe_list_sanitizer
skip if RUBY_VERSION < "2.3"

html = %{<a action='examp<!--" unsafeattr=foo()>-->le.com'>test</a>}

text = safe_list_sanitize(html, attributes: ["action"])
Expand Down

0 comments on commit 2936937

Please sign in to comment.