Skip to content

Commit 2936937

Browse files
authored
Merge pull request #177 from jweir/ruby-version-cleanup
Remove checks for Ruby versions no longer supported
2 parents 41ee2f8 + 589c938 commit 2936937

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

Gemfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ group :rubocop do
1616
end
1717

1818
# specify gem versions for old rubies
19-
gem "nokogiri", RUBY_VERSION < "2.1" ? "~> 1.6.0" : ">= 1.7"
20-
gem "activesupport", RUBY_VERSION < "2.2.2" ? "~> 4.2.0" : ">= 5"
19+
gem "nokogiri", ">= 1.7"
20+
gem "activesupport", ">= 5"

test/sanitizer_test.rb

-8
Original file line numberDiff line numberDiff line change
@@ -728,8 +728,6 @@ def test_abbr_attribute
728728
end
729729

730730
def test_uri_escaping_of_href_attr_in_a_tag_in_safe_list_sanitizer
731-
skip if RUBY_VERSION < "2.3"
732-
733731
html = %{<a href='examp<!--" unsafeattr=foo()>-->le.com'>test</a>}
734732

735733
text = safe_list_sanitize(html)
@@ -747,8 +745,6 @@ def test_uri_escaping_of_href_attr_in_a_tag_in_safe_list_sanitizer
747745
end
748746

749747
def test_uri_escaping_of_src_attr_in_a_tag_in_safe_list_sanitizer
750-
skip if RUBY_VERSION < "2.3"
751-
752748
html = %{<a src='examp<!--" unsafeattr=foo()>-->le.com'>test</a>}
753749

754750
text = safe_list_sanitize(html)
@@ -766,8 +762,6 @@ def test_uri_escaping_of_src_attr_in_a_tag_in_safe_list_sanitizer
766762
end
767763

768764
def test_uri_escaping_of_name_attr_in_a_tag_in_safe_list_sanitizer
769-
skip if RUBY_VERSION < "2.3"
770-
771765
html = %{<a name='examp<!--" unsafeattr=foo()>-->le.com'>test</a>}
772766

773767
text = safe_list_sanitize(html)
@@ -785,8 +779,6 @@ def test_uri_escaping_of_name_attr_in_a_tag_in_safe_list_sanitizer
785779
end
786780

787781
def test_uri_escaping_of_name_action_in_a_tag_in_safe_list_sanitizer
788-
skip if RUBY_VERSION < "2.3"
789-
790782
html = %{<a action='examp<!--" unsafeattr=foo()>-->le.com'>test</a>}
791783

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

0 commit comments

Comments
 (0)