@@ -65,7 +65,7 @@ static bool S_put_footnote_backref(cmark_html_renderer *renderer, cmark_strbuf *
65
65
renderer -> written_footnote_ix = renderer -> footnote_ix ;
66
66
67
67
cmark_strbuf_puts (html , "<a href=\"#fnref:" );
68
- cmark_strbuf_put (html , node -> as .literal .data , node -> as .literal .len );
68
+ houdini_escape_href (html , node -> as .literal .data , node -> as .literal .len );
69
69
cmark_strbuf_puts (html , "\" class=\"footnote-backref\">↩</a>" );
70
70
71
71
if (node -> footnote .def_count > 1 )
@@ -75,7 +75,7 @@ static bool S_put_footnote_backref(cmark_html_renderer *renderer, cmark_strbuf *
75
75
snprintf (n , sizeof (n ), "%d" , i );
76
76
77
77
cmark_strbuf_puts (html , " <a href=\"#fnref:" );
78
- cmark_strbuf_put (html , node -> as .literal .data , node -> as .literal .len );
78
+ houdini_escape_href (html , node -> as .literal .data , node -> as .literal .len );
79
79
cmark_strbuf_puts (html , ":" );
80
80
cmark_strbuf_puts (html , n );
81
81
cmark_strbuf_puts (html , "\" class=\"footnote-backref\">↩<sup class=\"footnote-ref\">" );
@@ -411,7 +411,7 @@ static int S_render_node(cmark_html_renderer *renderer, cmark_node *node,
411
411
++ renderer -> footnote_ix ;
412
412
413
413
cmark_strbuf_puts (html , "<li id=\"fn:" );
414
- cmark_strbuf_put (html , node -> as .literal .data , node -> as .literal .len );
414
+ houdini_escape_href (html , node -> as .literal .data , node -> as .literal .len );
415
415
cmark_strbuf_puts (html , "\">\n" );
416
416
} else {
417
417
if (S_put_footnote_backref (renderer , html , node )) {
@@ -424,9 +424,9 @@ static int S_render_node(cmark_html_renderer *renderer, cmark_node *node,
424
424
case CMARK_NODE_FOOTNOTE_REFERENCE :
425
425
if (entering ) {
426
426
cmark_strbuf_puts (html , "<sup class=\"footnote-ref\"><a href=\"#fn:" );
427
- cmark_strbuf_put (html , node -> parent_footnote_def -> as .literal .data , node -> parent_footnote_def -> as .literal .len );
427
+ houdini_escape_href (html , node -> parent_footnote_def -> as .literal .data , node -> parent_footnote_def -> as .literal .len );
428
428
cmark_strbuf_puts (html , "\" id=\"fnref:" );
429
- cmark_strbuf_put (html , node -> parent_footnote_def -> as .literal .data , node -> parent_footnote_def -> as .literal .len );
429
+ houdini_escape_href (html , node -> parent_footnote_def -> as .literal .data , node -> parent_footnote_def -> as .literal .len );
430
430
431
431
if (node -> footnote .ref_ix > 1 ) {
432
432
char n [32 ];
@@ -436,7 +436,7 @@ static int S_render_node(cmark_html_renderer *renderer, cmark_node *node,
436
436
}
437
437
438
438
cmark_strbuf_puts (html , "\">" );
439
- cmark_strbuf_put (html , node -> as .literal .data , node -> as .literal .len );
439
+ houdini_escape_href (html , node -> as .literal .data , node -> as .literal .len );
440
440
cmark_strbuf_puts (html , "</a></sup>" );
441
441
}
442
442
break ;
0 commit comments