summaryrefslogtreecommitdiff
path: root/src/html
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2014-09-04 17:49:13 +0200
committerVicent Marti <tanoku@gmail.com>2014-09-09 03:39:15 +0200
commitd8f44f1e4f0bd944ab43e6434a1579d670ed66cf (patch)
treeab2239dafd7127d545f27f65e7389d2427569fc0 /src/html
parent9830d3a05a374a0d05676301bd4065917b59ad53 (diff)
433/8
Diffstat (limited to 'src/html')
-rw-r--r--src/html/html.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/html/html.c b/src/html/html.c
index 913a602..41b8fda 100644
--- a/src/html/html.c
+++ b/src/html/html.c
@@ -174,7 +174,8 @@ void inlines_to_html(gh_buf *html, inl* ils)
case INL_LINK:
gh_buf_puts(html, "<a href=\"");
- escape_href(html, ils->content.linkable.url, -1);
+ if (ils->content.linkable.url)
+ escape_href(html, ils->content.linkable.url, -1);
if (ils->content.linkable.title) {
gh_buf_puts(html, "\" title=\"");
@@ -188,7 +189,8 @@ void inlines_to_html(gh_buf *html, inl* ils)
case INL_IMAGE:
gh_buf_puts(html, "<img src=\"");
- escape_href(html, ils->content.linkable.url, -1);
+ if (ils->content.linkable.url)
+ escape_href(html, ils->content.linkable.url, -1);
inlines_to_html(&scrap, ils->content.inlines);
gh_buf_puts(html, "\" alt=\"");