File tree Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ def sanitize(html, options = {})
4848 class LinkSanitizer < Sanitizer
4949 def initialize
5050 @link_scrubber = TargetScrubber . new
51- @link_scrubber . tags = %w( a href )
51+ @link_scrubber . tags = %w( a )
5252 @link_scrubber . attributes = %w( href )
5353 end
5454
@@ -146,7 +146,7 @@ def allowed_tags(options)
146146
147147 def allowed_attributes ( options )
148148 options [ :attributes ] || self . class . allowed_attributes
149- end
149+ end
150150 end
151151
152152 WhiteListSanitizer = SafeListSanitizer
Original file line number Diff line number Diff line change @@ -154,10 +154,6 @@ def test_strip_links_with_linkception
154154 assert_equal "Magic" , link_sanitize ( "<a href='http://www.rubyonrails.com/'>Mag<a href='http://www.ruby-lang.org/'>ic" )
155155 end
156156
157- def test_strip_links_with_a_tag_in_href
158- assert_equal "FrrFox" , link_sanitize ( "<href onlclick='steal()'>FrrFox</a></href>" )
159- end
160-
161157 def test_sanitize_form
162158 assert_sanitized "<form action=\" /foo/bar\" method=\" post\" ><input></form>" , ''
163159 end
You can’t perform that action at this time.
0 commit comments