@@ -489,31 +489,31 @@ def test_uri_escaping_of_href_attr_in_a_tag_in_white_list_sanitizer
489
489
490
490
text = white_list_sanitize ( html )
491
491
492
- assert_equal %{<a href="examp< !--%22%20unsafeattr=foo()>--> le.com">test</a>} , text
492
+ assert_equal %{<a href=\ " examp< !--%22%20unsafeattr=foo()>--> le.com\ " >test</a>} , text
493
493
end
494
494
495
495
def test_uri_escaping_of_src_attr_in_a_tag_in_white_list_sanitizer
496
496
html = %{<a src='examp<!--" unsafeattr=foo()>-->le.com'>test</a>}
497
497
498
498
text = white_list_sanitize ( html )
499
499
500
- assert_equal %{<a src="examp< !--%22%20unsafeattr=foo()>--> le.com">test</a>} , text
500
+ assert_equal %{<a src=\ " examp< !--%22%20unsafeattr=foo()>--> le.com\ " >test</a>} , text
501
501
end
502
502
503
503
def test_uri_escaping_of_name_attr_in_a_tag_in_white_list_sanitizer
504
504
html = %{<a name='examp<!--" unsafeattr=foo()>-->le.com'>test</a>}
505
505
506
506
text = white_list_sanitize ( html )
507
507
508
- assert_equal %{<a name="examp< !--%22%20unsafeattr=foo()>--> le.com">test</a>} , text
508
+ assert_equal %{<a name=\ " examp< !--%22%20unsafeattr=foo()>--> le.com\ " >test</a>} , text
509
509
end
510
510
511
511
def test_uri_escaping_of_name_action_in_a_tag_in_white_list_sanitizer
512
512
html = %{<a action='examp<!--" unsafeattr=foo()>-->le.com'>test</a>}
513
513
514
514
text = white_list_sanitize ( html , attributes : [ 'action' ] )
515
515
516
- assert_equal %{<a action="examp< !--%22%20unsafeattr=foo()>--> le.com">test</a>} , text
516
+ assert_equal %{<a action=\ " examp< !--%22%20unsafeattr=foo()>--> le.com\ " >test</a>} , text
517
517
end
518
518
519
519
protected
0 commit comments