@@ -23,11 +23,8 @@ impl<'a> MarkdownRenderer<'a> {
23
23
/// relative links in the input document. See that function for more detail.
24
24
fn new ( base_url : Option < & ' a str > ) -> MarkdownRenderer < ' a > {
25
25
let tag_attributes = hashmap ( & [
26
- ( "a" , hashset ( & [ "href" , "id" , "target" ] ) ) ,
27
- ( "img" , hashset ( & [ "width" , "height" , "src" , "alt" , "align" ] ) ) ,
26
+ ( "a" , hashset ( & [ "id" , "target" ] ) ) ,
28
27
( "input" , hashset ( & [ "checked" , "disabled" , "type" ] ) ) ,
29
- ( "th" , hashset ( & [ "rowspan" , "colspan" ] ) ) ,
30
- ( "td" , hashset ( & [ "rowspan" , "colspan" ] ) ) ,
31
28
] ) ;
32
29
let allowed_classes = hashmap ( & [ (
33
30
"code" ,
@@ -54,7 +51,8 @@ impl<'a> MarkdownRenderer<'a> {
54
51
html_sanitizer
55
52
. add_tags ( & [ "input" ] )
56
53
. link_rel ( Some ( "nofollow noopener noreferrer" ) )
57
- . tag_attributes ( tag_attributes)
54
+ . add_tag_attributes ( "a" , & [ "id" , "target" ] )
55
+ . add_tag_attributes ( "input" , & [ "checked" , "disabled" , "type" ] )
58
56
. allowed_classes ( allowed_classes)
59
57
. url_relative ( sanitize_url)
60
58
. id_prefix ( Some ( "user-content-" ) ) ;
0 commit comments