From 9830d3a05a374a0d05676301bd4065917b59ad53 Mon Sep 17 00:00:00 2001 From: Vicent Marti Date: Thu, 4 Sep 2014 17:42:12 +0200 Subject: 430/11 --- src/html/houdini_html_e.c | 4 ++-- src/html/html.c | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'src/html') diff --git a/src/html/houdini_html_e.c b/src/html/houdini_html_e.c index 5cdd3dd..95b6c41 100644 --- a/src/html/houdini_html_e.c +++ b/src/html/houdini_html_e.c @@ -62,8 +62,8 @@ houdini_escape_html0(gh_buf *ob, const uint8_t *src, size_t size, int secure) break; /* The forward slash is only escaped in secure mode */ - if (src[i] == '/' && !secure) { - gh_buf_putc(ob, '/'); + if ((src[i] == '/' || src[i] == '\'') && !secure) { + gh_buf_putc(ob, src[i]); } else { gh_buf_puts(ob, HTML_ESCAPES[esc]); } diff --git a/src/html/html.c b/src/html/html.c index cdccf2a..913a602 100644 --- a/src/html/html.c +++ b/src/html/html.c @@ -191,10 +191,9 @@ void inlines_to_html(gh_buf *html, inl* ils) escape_href(html, ils->content.linkable.url, -1); inlines_to_html(&scrap, ils->content.inlines); - if (scrap.size) { - gh_buf_puts(html, "\" alt=\""); + gh_buf_puts(html, "\" alt=\""); + if (scrap.size) escape_html(html, scrap.ptr, scrap.size); - } gh_buf_clear(&scrap); if (ils->content.linkable.title) { -- cgit v1.2.3