@@ -65,7 +65,7 @@ static bool S_put_footnote_backref(cmark_html_renderer *renderer, cmark_strbuf *
6565 renderer -> written_footnote_ix = renderer -> footnote_ix ;
6666
6767 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 );
6969 cmark_strbuf_puts (html , "\" class=\"footnote-backref\">↩</a>" );
7070
7171 if (node -> footnote .def_count > 1 )
@@ -75,7 +75,7 @@ static bool S_put_footnote_backref(cmark_html_renderer *renderer, cmark_strbuf *
7575 snprintf (n , sizeof (n ), "%d" , i );
7676
7777 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 );
7979 cmark_strbuf_puts (html , ":" );
8080 cmark_strbuf_puts (html , n );
8181 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,
411411 ++ renderer -> footnote_ix ;
412412
413413 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 );
415415 cmark_strbuf_puts (html , "\">\n" );
416416 } else {
417417 if (S_put_footnote_backref (renderer , html , node )) {
@@ -424,9 +424,9 @@ static int S_render_node(cmark_html_renderer *renderer, cmark_node *node,
424424 case CMARK_NODE_FOOTNOTE_REFERENCE :
425425 if (entering ) {
426426 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 );
428428 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 );
430430
431431 if (node -> footnote .ref_ix > 1 ) {
432432 char n [32 ];
@@ -436,7 +436,7 @@ static int S_render_node(cmark_html_renderer *renderer, cmark_node *node,
436436 }
437437
438438 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 );
440440 cmark_strbuf_puts (html , "</a></sup>" );
441441 }
442442 break ;
0 commit comments