File tree 2 files changed +2
-6
lines changed
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 = {})
48
48
class LinkSanitizer < Sanitizer
49
49
def initialize
50
50
@link_scrubber = TargetScrubber . new
51
- @link_scrubber . tags = %w( a href )
51
+ @link_scrubber . tags = %w( a )
52
52
@link_scrubber . attributes = %w( href )
53
53
end
54
54
@@ -146,7 +146,7 @@ def allowed_tags(options)
146
146
147
147
def allowed_attributes ( options )
148
148
options [ :attributes ] || self . class . allowed_attributes
149
- end
149
+ end
150
150
end
151
151
152
152
WhiteListSanitizer = SafeListSanitizer
Original file line number Diff line number Diff line change @@ -154,10 +154,6 @@ def test_strip_links_with_linkception
154
154
assert_equal "Magic" , link_sanitize ( "<a href='http://www.rubyonrails.com/'>Mag<a href='http://www.ruby-lang.org/'>ic" )
155
155
end
156
156
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
-
161
157
def test_sanitize_form
162
158
assert_sanitized "<form action=\" /foo/bar\" method=\" post\" ><input></form>" , ''
163
159
end
You can’t perform that action at this time.
0 commit comments