Skip to content

Commit

Permalink
Remove checks for Ruby versions no longer supported
Browse files Browse the repository at this point in the history
The Gem specifies a version of Ruby greater than or equal to 2.7.0
  • Loading branch information
jweir committed Jan 30, 2024
1 parent 41ee2f8 commit 589c938
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 589c938

Please sign in to comment.